forked from pulumi/pulumi-gcp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
38 lines (38 loc) · 1.71 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
# It may be tempting to add parens around each individual clause in this expression, but Travis then builds pushes anyway
if: branch = master OR branch =~ ^features/ OR branch =~ ^feature- OR branch =~ ^release/ OR tag =~ ^v\d+.*
language: go
go:
- 1.13.4
sudo: true # give us 7.5GB and >2 bursted cores.
git:
depth: false
cache:
directories:
- $HOME/google-cloud-sdk/
before_install:
- git clone https://github.com/pulumi/scripts ${GOPATH}/src/github.com/pulumi/scripts
- source ${GOPATH}/src/github.com/pulumi/scripts/ci/prepare-environment.sh
- source ${PULUMI_SCRIPTS}/ci/keep-failed-tests.sh
install:
- source ${PULUMI_SCRIPTS}/ci/install-common-toolchain.sh
- export CLOUDSDK_PYTHON=python3
# Install GCP SDK and Authenticate
- if [ ! -d ${HOME}/google-cloud-sdk/bin ]; then
export CLOUDSDK_CORE_DISABLE_PROMPTS=1; rm -rf ${HOME}/google-cloud-sdk; curl https://sdk.cloud.google.com | bash;
fi
- export PATH=${HOME}/google-cloud-sdk/bin:$PATH
- CLOUDSDK_PYTHON=/usr/bin/python gcloud version
- openssl aes-256-cbc -K $encrypted_9ddc6194f0f2_key -iv $encrypted_9ddc6194f0f2_iv -in gcp-credentials.json.enc -out gcp-credentials.json -d
- export GOOGLE_CREDENTIALS=$(cat gcp-credentials.json)
- CLOUDSDK_PYTHON=/usr/bin/python gcloud auth activate-service-account --key-file gcp-credentials.json
# Install Pulumi
- curl -L https://get.pulumi.com/ | bash
- export PATH=$HOME/.pulumi/bin:$PATH
before_script:
- ${PULUMI_SCRIPTS}/ci/ensure-dependencies
script:
- make travis_${TRAVIS_EVENT_TYPE}
after_failure:
- ${PULUMI_SCRIPTS}/ci/upload-failed-tests
notifications:
webhooks: https://zlmgkhmhjc.execute-api.us-west-2.amazonaws.com/stage/travis