-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (32 loc) · 1.21 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
language: generic
services:
- docker
env:
global:
- SHA=$(git rev-parse HEAD)
- CLOUDSDK_CORE_DISABLE_PROMPTS=1
before_install:
- openssl aes-256-cbc -K $encrypted_9f3b5599b056_key -iv $encrypted_9f3b5599b056_iv -in service-account.json.enc -out service-account.json -d
- curl https://sdk.cloud.google.com | bash > /dev/null;
- source $HOME/google-cloud-sdk/path.bash.inc
- gcloud components update kubectl
- gcloud auth activate-service-account --key-file service-account.json
- gcloud config set project indigo-charge-338516
- gcloud config set compute/zone us-central1-c
- gcloud container clusters get-credentials multi-cluster
# Build test version of client tests
- docker build -t sntshk/complex-client:test -f ./client/Dockerfile.dev ./client
# Run tests for client
- docker run -e CI=true sntshk/complex-client:test npm test
before_script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_ID" --password-stdin
script:
- docker build -t sntshk/complex-client ./client
- docker build -t sntshk/complex-server ./server
- docker build -t sntshk/complex-worker ./worker
deploy:
provider: script
script: bash docker_push_and_k8s_deploy.sh
on:
branch: master