forked from pulumi/pulumi-aws
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
43 lines (43 loc) · 2.21 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
# 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 =~ ^release/ OR tag IS present
language: go
go: 1.9
sudo: true # give us 7.5GB and >2 bursted cores.
git:
depth: false
before_install:
- export PULUMI_ROOT=/opt/pulumi
- git clone https://github.com/pulumi/scripts ${GOPATH}/src/github.com/pulumi/scripts
# Dep for Go dependency management.
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
# Gometalinter for good Go linting/hygiene.
- go get -v github.com/alecthomas/gometalinter
- gometalinter --install
# Node.js 6.10.2 for all JavaScript code (to match AWS Lambda).
- nvm install v6.10.2
# Install Yarn as per https://yarnpkg.com/lang/en/docs/install-ci/#travis-tab.
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.2.1
- export PATH=$HOME/.yarn/bin:$PATH
# Install Twine so that we can publish Pip packages.
- pip install --upgrade --user twine==1.9.1
# Set our token so we can publish npm packages if needed.
- if [ "${TRAVIS_SECURE_ENV_VARS:-}" = "true" ]; then echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > ~/.npmrc; fi
# Install the AWS CLI so that we can publish the resulting release (if applicable) at the end.
- pip install --upgrade --user awscli
- if [ "${TRAVIS_SECURE_ENV_VARS:-}" = "true" ]; then source ${GOPATH}/src/github.com/pulumi/scripts/ci/keep-failed-tests.sh; fi
# Install Pulumi
- curl -L https://get.pulumi.com/ | bash -s -- --version 0.14.0-rc1
- export PATH=$HOME/.pulumi/bin:$PATH
- sudo apt-get install pandoc
install:
# Now restore all dependencies, after cloning, to rebuild vendor appropriately.
- make ensure
before_script:
# Ensure the working tree is clean (make ensure may have updated lock files)
- ${GOPATH}/src/github.com/pulumi/scripts/ci/check-worktree-is-clean.sh
script:
- make travis_${TRAVIS_EVENT_TYPE}
after_failure:
- if [ "${TRAVIS_SECURE_ENV_VARS:-}" = "true" ]; then ${GOPATH}/src/github.com/pulumi/scripts/ci/upload-failed-tests; fi
notifications:
webhooks: https://ufci1w66n3.execute-api.us-west-2.amazonaws.com/stage/travis