-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
34 lines (34 loc) · 1.07 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
sudo: required
language: java
jdk:
- oraclejdk8
services:
- docker
cache:
directories:
- "$HOME/.cache"
- "$HOME/google-cloud-sdk/"
before_install:
- openssl aes-256-cbc -K $encrypted_3c4352e6fdc4_key -iv $encrypted_3c4352e6fdc4_iv
-in credentials.tar.gz.enc -out credentials.tar.gz -d
- |
if [ ! -d $HOME/google-cloud-sdk ]; then
curl https://sdk.cloud.google.com | bash;
fi
- BUILD_VERSION="v195"
- tar -xzf credentials.tar.gz
- mkdir -p lib
- gcloud auth activate-service-account --key-file deploy-key.json
before_deploy:
- curl https://download.sqreen.io/java/sqreen-latest-all.jar -o sqreen.jar
- docker build --build-arg BOT_TOKEN=$BOT_TOKEN --build-arg BUILD_VERSION=$BUILD_VERSION
--build-arg TYPEFORM_TOKEN=$TYPEFORM_TOKEN --build-arg SQREEN_TOKEN=$SQREEN_TOKEN
-t us.gcr.io/hawthorne-197812/hawthorne-bot:$BUILD_VERSION .
deploy:
provider: script
script: gcloud docker -- push us.gcr.io/hawthorne-197812/hawthorne-bot:${BUILD_VERSION}
skip_cleanup: true
on:
branch: master
env:
- PATH=$PATH:$HOME/google-cloud-sdk/bin CLOUDSDK_CORE_DISABLE_PROMPTS=1