forked from alphagov/paas-cf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
64 lines (61 loc) · 1.87 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
dist: trusty
sudo: false
rvm:
- 2.5
env:
global:
- TF_VERSION="0.11.1"
- BOSH_CLI_VERSION="2.0.48"
- PROMETHEUS_VERSION="2.6.1"
- DEPLOY_ENV="travis"
addons:
apt:
sources:
- git-core
packages:
- git
- gnupg
before_install:
- |
mkdir ~/bin
export PATH=~/bin:$PATH
- |
echo "Fetching shellcheck"
set -e
wget -O ~/bin/shellcheck https://github.com/alphagov/paas-cf/releases/download/shellcheck_binary_0.4.6/shellcheck_linux_amd64
chmod +x ~/bin/shellcheck
set +e
- |
echo "Fetching Terraform"
set -e
wget https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip
unzip -o terraform_${TF_VERSION}_linux_amd64.zip -d ~/bin
rm terraform_${TF_VERSION}_linux_amd64.zip
set +e
- |
echo "Fetching bosh cli v2"
set -e
wget https://s3.amazonaws.com/bosh-cli-artifacts/bosh-cli-${BOSH_CLI_VERSION}-linux-amd64
mv bosh-cli-${BOSH_CLI_VERSION}-linux-amd64 ~/bin/bosh && chmod +x ~/bin/bosh
set +e
- |
echo "Fetching Promtool ${PROMETHEUS_VERSION}"
set -e
wget -O prometheus.tgz "https://github.com/prometheus/prometheus/releases/download/v${PROMETHEUS_VERSION}/prometheus-${PROMETHEUS_VERSION}.linux-amd64.tar.gz"
tar xzf "prometheus.tgz" \
-C $HOME/bin/ \
--wildcards \
--wildcards-match-slash \
--strip-components=1 \
'*promtool'
set +e
- pip install --user yamllint
- GIMME_OUTPUT=$(gimme 1.11 | tee -a $HOME/.bashrc) && eval "$GIMME_OUTPUT"
- export GOPATH=$HOME/gopath
- export PATH=$HOME/gopath/bin:$PATH
- mkdir -p $HOME/gopath/src/github.com/alphagov/paas-cf
- rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/github.com/alphagov/paas-cf/
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/alphagov/paas-cf
- cd $HOME/gopath/src/github.com/alphagov/paas-cf
script:
- make test