2018-06-20 02:22:35 +00:00
|
|
|
sudo: required
|
2017-10-16 03:35:58 +00:00
|
|
|
language: node_js
|
|
|
|
node_js:
|
2018-06-19 22:22:18 +00:00
|
|
|
- "8.11.1"
|
|
|
|
|
2018-08-27 21:30:34 +00:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- "$HOME/google-cloud-sdk/"
|
|
|
|
|
2018-06-19 22:22:18 +00:00
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
2018-08-27 21:30:34 +00:00
|
|
|
before_install:
|
|
|
|
- docker-compose -f docker-compose-development.yml up -d
|
|
|
|
- docker ps -a
|
|
|
|
|
|
|
|
install: true
|
|
|
|
|
|
|
|
script:
|
|
|
|
- docker-compose exec -T app npm run test --verbose
|
|
|
|
|
|
|
|
before_deploy:
|
2018-08-27 22:01:30 +00:00
|
|
|
- docker-compose stop
|
2018-08-27 22:41:36 +00:00
|
|
|
- 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 >/dev/null; fi
|
2018-08-27 21:30:34 +00:00
|
|
|
- source /home/travis/google-cloud-sdk/path.bash.inc
|
|
|
|
- gcloud --quiet version
|
|
|
|
- gcloud --quiet components update
|
|
|
|
- gcloud --quiet components update kubectl
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
- provider: script
|
2018-08-27 21:59:09 +00:00
|
|
|
script: ./deploy.sh
|
2018-08-27 21:30:34 +00:00
|
|
|
skip_cleanup: true
|
|
|
|
on:
|
2018-08-27 21:38:59 +00:00
|
|
|
branch: production-docker
|
|
|
|
- provider: script
|
2018-08-27 21:59:09 +00:00
|
|
|
script: ./deploy.sh
|
2018-08-27 21:38:59 +00:00
|
|
|
skip_cleanup: true
|
|
|
|
on:
|
|
|
|
branch: master
|
2018-08-27 21:30:34 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- APP_IMAGE_NAME=p5jswebeditor_app
|