-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
37 lines (32 loc) · 1.24 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
sudo: required
services:
- docker
cache:
directories:
- "$HOME/google-cloud-sdk/"
before_install:
- export SHA=$(git rev-parse HEAD)
#install gcloud
- gcloud version || true
- if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf $HOME/google-cloud-sdk; export CLOUDSDK_CORE_DISABLE_PROMPTS=1; curl https://sdk.cloud.google.com | bash > /dev/null; fi
- source $HOME/google-cloud-sdk/path.bash.inc
- gcloud version
#update kubectl
- gcloud components install kubectl
#load service account secret
- openssl aes-256-cbc -K $encrypted_0c35eebf403c_key -iv $encrypted_0c35eebf403c_iv -in co-swipelab-rage-travis.json.enc -out co-swipelab-rage-travis.json -d
- gcloud auth activate-service-account --key-file co-swipelab-rage-travis.json
#setup project
- gcloud config set project co-swipelab-rage
- gcloud config set compute/zone europe-west2-a
- gcloud container clusters get-credentials rage-cluster
#docker login
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t swipelab/rage-ghost-test -f ./ghost/Dockerfile.dev .
script:
- docker run swipelab/rage-ghost-test dotnet test ghost.test.dll
deploy:
provider: script
script: bash ./deploy.sh
on:
branch: master