Last active
March 30, 2017 18:26
-
-
Save pomber/777495c2dee5d93346ba40a01928d176 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo: false | |
language: node_js | |
node_js: | |
- "node" | |
cache: | |
yarn: true | |
directories: | |
- "$HOME/google-cloud-sdk/" | |
services: | |
- docker | |
before_install: npm install yarn -g | |
env: | |
global: | |
- GOOGLE_APPLICATION_CREDENTIALS=~/gcloud-service-key.json | |
- PROJECT_PROD=sanata-prod | |
- CLUSTER=sanata-cluster | |
- ZONE=us-central1-b | |
- NGINX_IMAGE=sanata-web | |
- NODE_IMAGE=sanata-srv | |
- NGINX_DEPLOYMENT=nginx-deploy | |
- NODE_DEPLOYMENT=node-deploy | |
- NGINX_CONTAINER=nginx-container | |
- NODE_CONTAINER=node-container | |
script: | |
- npm test | |
- npm run build | |
before_deploy: | |
- if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf $HOME/google-cloud-sdk; export CLOUDSDK_CORE_DISABLE_PROMPTS=1; curl https://sdk.cloud.google.com | bash; fi | |
- source /home/travis/google-cloud-sdk/path.bash.inc | |
- gcloud --quiet version | |
- gcloud --quiet components update | |
- gcloud --quiet components update kubectl | |
deploy: | |
- provider: script | |
script: chmod +x gcloud/deploy-prod.sh && gcloud/deploy-prod.sh | |
skip_cleanup: true | |
on: | |
branch: master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment