forked from habitat-sh/builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
236 lines (225 loc) · 7.58 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
branches:
only:
- master
- /^sentinel.+$/
- /^acceptance_deploy.+$/
- /^test_development-.*$/
- /^\d+\.\d+\.\d+$/
os: linux
env:
global:
- PATH=$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin:$HOME/.cargo/bin:$PATH
# Habitat Rust program components
- _RUST_HAB_BIN_COMPONENTS=""
# Builder Rust program components
- _RUST_BLDR_BIN_COMPONENTS="components/builder-api components/builder-jobsrv components/builder-worker"
# Builder Rust crate components
- _RUST_BLDR_LIB_COMPONENTS="components/builder-core components/builder-db components/github-api-client components/segment-api-client"
matrix:
include:
# Testing Jobs
########################################################################
#
# Job for linting Builder shell program components
#
- sudo: false
script:
- ./test/shellcheck.sh
#
# Job for testing Builder Rust binaries
# This runs cargo unit tests
#
- language: rust
env:
- COMPONENTS=bin
- AFFECTED_FILES="Cargo.lock"
- AFFECTED_DIRS="$_RUST_HAB_BIN_COMPONENTS"
rust: 1.33.0
sudo: false
services:
- docker
addons:
apt:
sources:
- kalakris-cmake
packages:
- build-essential
- ca-certificates
- cmake
- curl
- libbz2-dev
- liblzma-dev
- libssl-dev
- pkg-config
cache:
apt: true
cargo: true
directories:
- "$HOME/pkgs"
before_install:
- ./support/ci/fast_pass.sh || exit 0
- ./support/ci/install_hab.sh
- ./support/ci/install_protobuf.sh
- ./support/ci/compile_libsodium.sh
- ./support/ci/compile_libarchive.sh
- ./support/ci/compile_zmq.sh
- source ./support/ci/rust_env.sh
script:
- ./support/ci/rust_tests.sh
#
# Job for testing Builder Rust libraries
# This runs cargo unit tests
#
- language: rust
env:
- COMPONENTS=lib
- AFFECTED_FILES="Cargo.lock"
- AFFECTED_DIRS="$_RUST_BLDR_LIB_COMPONENTS"
rust: 1.33.0
sudo: required
addons:
apt:
sources:
- kalakris-cmake
packages:
- build-essential
- ca-certificates
- cmake
- curl
- libbz2-dev
- liblzma-dev
- libssl-dev
- pkg-config
cache:
apt: true
cargo: true
directories:
- "$HOME/pkgs"
before_install:
- ./support/ci/fast_pass.sh || exit 0
- ./support/ci/install_hab.sh
- ./support/ci/install_protobuf.sh
- ./support/ci/compile_libsodium.sh
- ./support/ci/compile_libarchive.sh
- ./support/ci/compile_zmq.sh
- source ./support/ci/rust_env.sh
script:
- ./support/ci/rust_tests.sh
#
# Job for linting with clippy and running rustfmt
#
- language: rust
env:
- AFFECTED_FILES=""
- AFFECTED_DIRS="$_RUST_HAB_BIN_COMPONENTS $_RUST_BLDR_BIN_COMPONENTS $_RUST_BLDR_LIB_COMPONENTS"
rust: 1.33.0
sudo: required
addons:
apt:
sources:
- kalakris-cmake
packages:
- build-essential
- ca-certificates
- cmake
- curl
- libbz2-dev
- liblzma-dev
- libssl-dev
- pkg-config
cache:
apt: true
cargo: true
directories:
- "$HOME/pkgs"
before_script:
- rustup component add clippy
before_install:
- ./support/ci/fast_pass.sh || exit 0
- ./support/ci/install_hab.sh
- ./support/ci/install_protobuf.sh
- ./support/ci/compile_libsodium.sh
- ./support/ci/compile_libarchive.sh
- ./support/ci/compile_zmq.sh
- source ./support/ci/rust_env.sh
# We need to build habitat-builder-protocol first, otherwise rustfmt
# barfs when it encounters
# components/builder-protocol/src/message/mod.rs which references
# modules that don't exist yet.
- cargo build --package habitat-builder-protocol
script:
- ./support/ci/rustfmt.sh
- cargo clippy -- -D warnings
#
# Job for testing Builder Rust services
# This runs studio-based end-to-end-tests
# Cargo unit tests are NOT run
#
- language: rust
env:
- COMPONENTS=srv
- AFFECTED_FILES="Cargo.lock .travis.yml .envrc .studiorc"
- AFFECTED_DIRS=".secrets support $_RUST_BLDR_BIN_COMPONENTS $_RUST_BLDR_LIB_COMPONENTS"
rust: 1.33.0
sudo: required
addons:
apt:
packages:
- ca-certificates
- curl
cache:
apt: true
cargo: true
directories:
- "$HOME/pkgs"
before_install:
- ./support/ci/fast_pass.sh || exit 0
- ./support/ci/install_hab.sh
- openssl aes-256-cbc -K $encrypted_builder_github_app_pem_key -iv $encrypted_builder_github_app_pem_iv -in ./support/ci/builder-github-app.pem.enc -out /tmp/builder-github-app.pem -d
script:
- ./test/builder-api/test.sh
# Web Jobs
########################################################################
#
# Job for testing Builder Web components
#
- language: node_js
node_js: 8.7.0
sudo: false
env:
- CXX=g++-4.8
- AFFECTED_FILES=""
- AFFECTED_DIRS="components/builder-web"
- secure: fXvLiTey3v9LxPnxPJk6QAE5PdJOIEIRihF5hN/UYwhnbjXCVfcz5ODYNvFyeb6OY31/eMMrZ+jHkNyO/VLp2ZL5PjHpoDGH7KJWxTqXQ/yCHMo0jFxHqXcmc+Gi2RKbeBfVnSt4LLNzrN4iAtqG7Pmavfu4t8aZ+O8HsPCAsp8ExsPhWLyPxSJ2YcVF3i9O5P1E8W6SbMj5h4IA0rpwB1imaEdQ7OTKE2+0FpRCxRMD/axW7cnfxiVYt28wCiWh6w3sGw8fYQXHulokLzwvJaUfF2HiMs1b+cAwyOoy0wA59oF7O+kJxPnbFK3mHqsB2lShE6niWMZsfpEKYtLR1hs2owv5MV4rh8f2EnHHa1Gc6FWFW45NI1sksDi6CiC/B4JkhAuyw9o0tJnGgagyKA/c2potSlpB6QmaYR1REy2FqIPliR0xBUB80FngZd7BNRB2ekSae0k4hj7MRqc6e6YJcFR/hsXZ//JuS4CEvFo2KD9CG31WisM7XVrxGCgguRiqR4syrfiwtyLm+SvtzJRL8g2TndhqCOAJTjQzHhb4D/F/E8hLbd2u1tsBJvKKxNshQpwf2dgGv6zZOm68pi1IeLbMZdEpKzszDLI+MPd31GCw20EAjjJno+63zT71JWauZqZZgSWWiof5S4KGVasF4WXtsP9Fg0CEIl8pbJs=
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- wget
cache:
apt: true
before_install:
- ./support/ci/fast_pass.sh || exit 0
- npm config set spin=false
install:
- "(cd components/builder-web && npm install)"
script:
- "(cd components/builder-web && npm run travis)"
notifications:
webhooks:
urls:
- http://bots.habitat.sh:4567/travis
on_success: always
on_failure: always
on_start: always
slack:
template:
- "%{repository} (%{commit}) : %{message}"
- "Build details: %{build_url}"
- "Status: %{result}"
secure: "bRaFFuuxhV4bv53JzWRWXqe2vZNfQ3UvhNJnqwxp+hPG6wYxJ8hsvPQtUq7esetDhnlru5aje2tUMioBcZB33ByO/DF4Q52WEi3nwdOmVkcmbn+FJEpCX7y+vfwglzHC1UvtOm2qIaIKjSsWY5vK05Ee5QIZtZtO0Qa6jg9JF521erSYqNV40qJwsEfvsm16RHVuV6tJGmz20EDXt47c3D1aTkhDCtufJWHNOj0pG6nGw7UVlh/xpEm3SikW141s6PtZ8dsG57emYW902s1F1G+DJRGVC0TquatWCqc7PYnmuZMofR01LMfXvya0O6TcXqppHBBm2snnucQeeB+r/tyPJTFulXpUOvDHz/Elhj+Bu6hxOufyWBRQCOnr6ubclxiFYMK4At8qAQE51HjhT4aqfxqHaOZdy2STwi6HPVdQvd8wCVnWYz6DbBLx6c1FBX93uuj/n3nP3LX9+IOc5O/gpHC91m/Fids5QvKVVpKV71ZNMNouJANIw/qAa2bZ6b14RNusUo0zTB4CjzvNbItUNvG5hIhtQXHS3jobfZekYFW42e+jlCMVYpBzSCNi9dwsfXvMsRKoW7Cel5fnscYneCagHbGDC1azi+Uv+dWY13y2MaGFv8QForFt2yQRGHl82ht91sEqrBiF1F4fs9mTBcrLq3oFDrUKKaH87WI="
on_pull_requests: false
on_failure: always
on_success: change