-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
28 lines (26 loc) · 1.07 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
sudo: required
services:
- docker
env:
global:
- SHA=$(git rev-parse HEAD) # get git SHA from HEAD
- CLOUDSDK_CORE_DISABLE_PROMPTS=1 # respond to prompts
before_install:
- openssl aes-256-cbc -K $encrypted_0c35eebf403c_key -iv $encrypted_0c35eebf403c_iv -in service-account.json.enc -out service-account.json -d
- curl https://sdk.cloud.google.com | bash > /dev/null; # google sdk
- source $HOME/google-cloud-sdk/path.bash.inc # apply config to bash shell
- gcloud components update kubectl # k8s
- gcloud auth activate-service-account --key-file service-account.json # IAM equivalent
- gcloud config set project multi-k8s-247120
- gcloud config set compute/zone us-west2-a
- gcloud container clusters get-credentials multi-cluster
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t awakenedmind/react-test -f ./client/Dockerfile.dev ./client
script:
- docker run awakenedmind/react-test npm test -- --coverage
# Custom K8s deployment
deploy:
provider: script
script: bash ./deploy.sh
on:
branch: master