-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
36 lines (36 loc) · 1.13 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
sudo: required
language: node_js
node_js:
- node
services:
- docker
cache:
directories:
- "$HOME/google-cloud-sdk/"
env:
global:
- CLOUDSDK_CORE_DISABLE_PROMPTS=1
- PATH=$PATH:$HOME/google-cloud-sdk/bin
- PROJECT_ID="uhlu-179602"
- ZONE="us-central1-b"
- IMAGE_NAME=uhlu:latest
- FULL_IMAGE_NAME=gcr.io/$PROJECT_ID/$IMAGE_NAME
- GOOGLE_APPLICATION_CREDENTIALS="${PWD}/client-secret.json"
- CLUSTER_NAME=uhlu
before_install:
- if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf $HOME/google-cloud-sdk; curl https://sdk.cloud.google.com | bash; fi
- source /home/travis/google-cloud-sdk/path.bash.inc
- gcloud version
- gcloud --quiet components update kubectl
- gcloud auth activate-service-account --key-file "${GOOGLE_APPLICATION_CREDENTIALS}";
- gcloud config set project $PROJECT_ID;
- gcloud config set compute/zone $ZONE;
install: true
before_script:
- docker build --no-cache=true -t $FULL_IMAGE_NAME .
- gcloud docker -- push $FULL_IMAGE_NAME
script:
- gcloud container clusters get-credentials $CLUSTER_NAME
- kubectl apply -f deployment.yml
- kubectl apply -f service.yml
- kubectl apply -f ingress.yml