-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
38 lines (38 loc) · 1.22 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
37
38
sudo: required
language: elixir
elixir: '1.7.0'
notifications:
- email: false
services:
- docker
cache:
directories:
- "$HOME/google-cloud-sdk/"
before_install:
- openssl aes-256-cbc -K $encrypted_6e166d9810ad_key -iv $encrypted_6e166d9810ad_iv
-in credentials.tar.gz.enc -out credentials.tar.gz -d
- export BRANCH=$(echo "${TRAVIS_BRANCH//'/'/-}")
- export VERSION=$(cat mix.exs | grep version | sed "s/.*\"\(.*\)\".*/\1/")
before_script:
- gcloud version || true
- 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 version
- chmod +x ./scripts/*
- "./scripts/build.sh"
- export GOOGLE_APPLICATION_CREDENTIALS=jesse-hosted-key.json
script:
- docker-compose -f docker-compose.test.yml build
- docker-compose -f docker-compose.test.yml run jesse-hosted-test mix test
deploy:
- provider: script
skip_cleanup: true
script: scripts/deploy.sh ${CONTAINER_IMAGE} ${DOCKER_REPO} ${BRANCH} ${VERSION}
on:
branch: develop
- provider: script
skip_cleanup: true
script: scripts/deploy.sh ${CONTAINER_IMAGE} ${DOCKER_REPO} ${BRANCH} ${VERSION}
on:
branch: master