Skip to content

Instantly share code, notes, and snippets.

@pomber
Last active March 30, 2017 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pomber/777495c2dee5d93346ba40a01928d176 to your computer and use it in GitHub Desktop.
Save pomber/777495c2dee5d93346ba40a01928d176 to your computer and use it in GitHub Desktop.
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