forked from DataBiosphere/jade-data-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (43 loc) · 1.42 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
39
40
41
42
43
44
45
46
47
48
49
50
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/google-cloud-sdk/
env:
- PATH=${HOME}/google-cloud-sdk/bin:$PATH CLOUDSDK_CORE_DISABLE_PROMPTS=1
language: java
jdk:
- openjdk8
addons:
postgresql: "9.6"
services:
- docker
- postgresql
before_install:
- if [ ! -d ${HOME}/google-cloud-sdk/bin ]; then
rm -rf $HOME/google-cloud-sdk;
curl https://sdk.cloud.google.com | bash > /dev/null;
fi
- source $HOME/google-cloud-sdk/path.bash.inc
- gcloud config set project $INTEGRATION_PROJECT
- gcloud config set compute/zone $INTEGRATION_ZONE
- ./render-configs.sh $TRAVIS_TOKEN
- gcloud auth activate-service-account --key-file $GOOGLE_APPLICATION_CREDENTIALS
- gcloud auth configure-docker
- gcloud components install kubectl
- gcloud container clusters get-credentials $CLUSTER_NAME
- curl 'https://api.ipify.org?format=json'
script:
- set -e
- psql -U postgres -f ./db/create-data-repo-db
- GCR_TAG=$(git rev-parse --short HEAD) ./gradlew jib
- kubectl --namespace temp set image
deployment/temp-jade-datarepo-api
"temp-jade-datarepo-api=gcr.io/${DEV_PROJECT}/jade-data-repo:$(git rev-parse --short HEAD)"
- ./gradlew assemble
- ./gradlew check --scan
- ./gradlew testConnected --scan
- ./gradlew testIntegration --scan