-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (31 loc) · 1.22 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
cache:
directories:
# We cache the SDK so we don't have to download it again on subsequent builds.
- $HOME/google-cloud-sdk
services:
- docker
env:
global:
# COMMIT SHA
- SHA=$(git rev-parse HEAD)
# Do not prompt for user input when using any SDK methods.
- CLOUDSDK_CORE_DISABLE_PROMPTS=1
before_install:
- openssl aes-256-cbc -K $encrypted_9e3bc2abf21f_key -iv $encrypted_9e3bc2abf21f_iv -in service-account.json.enc -out service-account.json -d
- if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf "$HOME/google-cloud-sdk"; curl https://sdk.cloud.google.com | bash > /dev/null; fi
- 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 "$PROJECT_ID"
- gcloud config set compute/zone "$ZONE"
- gcloud container clusters get-credentials "$CLUSTER_NAME"
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t fullammo/react-test -f ./client/Dockerfile.dev ./client
script:
- docker run -e CI=true fullammo/react-test npm run test
deploy:
provider: script
script: bash ./deploy.sh
on:
branch: master