-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
27 lines (27 loc) · 1006 Bytes
/
.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
services: docker
env:
global:
- CLOUDSDK_CORE_DISABLE_PROMPTS=1 # prevent gcloud from prompting
- CLUSTER_NAME=happy-frog-cluster-1
- DEPLOYMENT_NAME=web-app
- GCP_PROJECT_ID=happy-frog
- IMAGE=gcr.io/happy-frog/web-app
- REGION=europe-west1
before_install:
- openssl aes-256-cbc -K $encrypted_49e8e0548f04_key -iv $encrypted_49e8e0548f04_iv -in google-key.json.enc -out google-key.json -d
- curl https://sdk.cloud.google.com | bash > /dev/null
- source "$HOME/google-cloud-sdk/path.bash.inc"
- gcloud auth activate-service-account --key-file=google-key.json
- gcloud auth configure-docker
- gcloud config set project "${GCP_PROJECT_ID}"
- gcloud config set container/cluster "${CLUSTER_NAME}"
- gcloud config set compute/zone "${REGION}"
- gcloud container clusters get-credentials "${CLUSTER_NAME}"
- gcloud components install beta
install: true # no-op
script:
- |
set -ex;
docker build -t "${IMAGE}:${TRAVIS_COMMIT}" ./web && \
docker push "${IMAGE}:${TRAVIS_COMMIT}" && \
set +x