]>
Commit | Line | Data |
---|---|---|
5c4dfe0c MV |
1 | variables: |
2 | DEBIAN_FRONTEND: noninteractive | |
3 | LC_ALL: C | |
4 | GIT_STRATEGY: fetch | |
5 | DOCKER_CMD: docker --config="$HOME/.docker/$CI_JOB_ID/" | |
6 | IMG_BASE: registry.labs.nic.cz/labs/bird | |
faa43a75 | 7 | TOOLS_DIR: /var/lib/gitlab-runner/bird-tools |
5c4dfe0c MV |
8 | |
9 | stages: | |
10 | - image | |
11 | - build | |
faa43a75 | 12 | - test |
5c4dfe0c MV |
13 | |
14 | .docker: &docker_build | |
15 | stage: image | |
16 | allow_failure: true | |
17 | script: | |
18 | - $DOCKER_CMD login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.labs.nic.cz | |
19 | # Make sure we refresh the base image if it updates (eg. security updates, etc) | |
20 | # If we do just the build, cache is always reused and the freshness of the | |
21 | # base image is never checked. However, pull always asks and updates the | |
22 | # image only if it changed ‒ therefore, the cache is used unless there's a | |
23 | # change. | |
24 | - $DOCKER_CMD pull `sed -ne 's/^FROM //p' "misc/docker/$IMG_NAME/Dockerfile"` | |
25 | - $DOCKER_CMD build -t "bird:$IMG_NAME" "misc/docker/$IMG_NAME" | |
26 | - $DOCKER_CMD tag "bird:$IMG_NAME" "$IMG_BASE:$IMG_NAME" | |
27 | - $DOCKER_CMD push "$IMG_BASE:$IMG_NAME" | |
28 | after_script: | |
29 | - rm -f "$HOME/.docker/$CI_JOB_ID/" # cleanup the credentials | |
30 | tags: | |
31 | # That's Docker in Docker | |
32 | - dind | |
33 | ||
34 | docker_debian-7-amd64: | |
35 | variables: | |
36 | IMG_NAME: "debian-7-amd64" | |
37 | <<: *docker_build | |
38 | ||
92249894 MH |
39 | docker_debian-7-i386: |
40 | variables: | |
41 | IMG_NAME: "debian-7-i386" | |
42 | <<: *docker_build | |
43 | ||
5c4dfe0c MV |
44 | docker_debian-8-amd64: |
45 | variables: | |
46 | IMG_NAME: "debian-8-amd64" | |
47 | <<: *docker_build | |
48 | ||
92249894 MH |
49 | docker_debian-8-i386: |
50 | variables: | |
51 | IMG_NAME: "debian-8-i386" | |
52 | <<: *docker_build | |
53 | ||
5c4dfe0c MV |
54 | docker_debian-9-amd64: |
55 | variables: | |
56 | IMG_NAME: "debian-9-amd64" | |
57 | <<: *docker_build | |
58 | ||
92249894 | 59 | docker_debian-9-i386: |
5c4dfe0c | 60 | variables: |
92249894 | 61 | IMG_NAME: "debian-9-i386" |
5c4dfe0c MV |
62 | <<: *docker_build |
63 | ||
92249894 | 64 | docker_debian-10-amd64: |
5c4dfe0c | 65 | variables: |
92249894 | 66 | IMG_NAME: "debian-10-amd64" |
5c4dfe0c MV |
67 | <<: *docker_build |
68 | ||
92249894 | 69 | docker_debian-10-i386: |
5c4dfe0c | 70 | variables: |
92249894 | 71 | IMG_NAME: "debian-10-i386" |
5c4dfe0c MV |
72 | <<: *docker_build |
73 | ||
92249894 | 74 | docker_debian-testing-amd64: |
5c4dfe0c | 75 | variables: |
92249894 | 76 | IMG_NAME: "debian-testing-amd64" |
5c4dfe0c MV |
77 | <<: *docker_build |
78 | ||
79 | docker_debian-testing-i386: | |
80 | variables: | |
81 | IMG_NAME: "debian-testing-i386" | |
82 | <<: *docker_build | |
83 | ||
84 | docker_fedora-25-amd64: | |
85 | variables: | |
86 | IMG_NAME: "fedora-25-amd64" | |
87 | <<: *docker_build | |
88 | ||
89 | docker_fedora-26-amd64: | |
90 | variables: | |
91 | IMG_NAME: "fedora-26-amd64" | |
92 | <<: *docker_build | |
93 | ||
92249894 MH |
94 | docker_fedora-27-amd64: |
95 | variables: | |
96 | IMG_NAME: "fedora-27-amd64" | |
97 | <<: *docker_build | |
98 | ||
99 | docker_fedora-28-amd64: | |
100 | variables: | |
101 | IMG_NAME: "fedora-28-amd64" | |
102 | <<: *docker_build | |
103 | ||
104 | docker_fedora-29-amd64: | |
105 | variables: | |
106 | IMG_NAME: "fedora-29-amd64" | |
107 | <<: *docker_build | |
108 | ||
109 | docker_fedora-30-amd64: | |
110 | variables: | |
111 | IMG_NAME: "fedora-30-amd64" | |
112 | <<: *docker_build | |
113 | ||
114 | docker_fedora-31-amd64: | |
115 | variables: | |
116 | IMG_NAME: "fedora-31-amd64" | |
117 | <<: *docker_build | |
118 | ||
5c4dfe0c MV |
119 | docker_centos-7-amd64: |
120 | variables: | |
121 | IMG_NAME: "centos-7-amd64" | |
122 | <<: *docker_build | |
123 | ||
92249894 | 124 | docker_centos-8-amd64: |
5c4dfe0c | 125 | variables: |
92249894 | 126 | IMG_NAME: "centos-8-amd64" |
5c4dfe0c MV |
127 | <<: *docker_build |
128 | ||
129 | docker_ubuntu-14_04-amd64: | |
130 | variables: | |
131 | IMG_NAME: "ubuntu-14.04-amd64" | |
132 | <<: *docker_build | |
92249894 | 133 | |
5c4dfe0c MV |
134 | docker_ubuntu-16_04-amd64: |
135 | variables: | |
136 | IMG_NAME: "ubuntu-16.04-amd64" | |
137 | <<: *docker_build | |
92249894 MH |
138 | |
139 | docker_ubuntu-18_04-amd64: | |
140 | variables: | |
141 | IMG_NAME: "ubuntu-18.04-amd64" | |
142 | <<: *docker_build | |
143 | ||
144 | docker_ubuntu-19_04-amd64: | |
145 | variables: | |
146 | IMG_NAME: "ubuntu-19.04-amd64" | |
147 | <<: *docker_build | |
148 | ||
149 | docker_opensuse-15.0-amd64: | |
150 | variables: | |
151 | IMG_NAME: "opensuse-15.0-amd64" | |
152 | <<: *docker_build | |
153 | ||
154 | docker_opensuse-15.1-amd64: | |
155 | variables: | |
156 | IMG_NAME: "opensuse-15.1-amd64" | |
157 | <<: *docker_build | |
5c4dfe0c | 158 | |
92249894 MH |
159 | # TODO We want to copy these BSDs to our own virtual machines, to make sure |
160 | # someone doesn't update them by accident. | |
161 | .freebsd-11-i386: &freebsd-11-i386_env | |
162 | tags: | |
163 | - freebsd | |
164 | - i386 | |
165 | #only: | |
166 | #- master | |
167 | #- triggers | |
168 | #- tags | |
169 | ||
170 | .freebsd-11-amd64: &freebsd-11-amd64_env | |
171 | tags: | |
172 | - freebsd | |
173 | - amd64 | |
5c4dfe0c | 174 | |
0adfa0ec | 175 | .build: &build-base |
5c4dfe0c MV |
176 | stage: build |
177 | script: | |
178 | - autoreconf | |
4ff15a75 | 179 | - ./configure CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" |
5c4dfe0c MV |
180 | # Detect which make is available |
181 | - MAKE=make | |
182 | - which gmake 2>/dev/null >/dev/null && MAKE=gmake | |
183 | - $MAKE | |
cb5df823 OZ |
184 | # Run tests if they are available |
185 | - $MAKE check | |
5c4dfe0c | 186 | |
0adfa0ec OZ |
187 | .build-linux: &build-linux |
188 | <<: *build-base | |
189 | tags: | |
190 | - docker | |
191 | - linux | |
192 | - amd64 | |
193 | ||
5c4dfe0c | 194 | build-debian-7-amd64: |
0adfa0ec OZ |
195 | <<: *build-linux |
196 | image: registry.labs.nic.cz/labs/bird:debian-7-amd64 | |
197 | ||
198 | build-debian-7-i386: | |
199 | <<: *build-linux | |
200 | image: registry.labs.nic.cz/labs/bird:debian-7-i386 | |
5c4dfe0c MV |
201 | |
202 | build-debian-8-amd64: | |
0adfa0ec OZ |
203 | <<: *build-linux |
204 | image: registry.labs.nic.cz/labs/bird:debian-8-amd64 | |
205 | ||
206 | build-debian-8-i386: | |
207 | <<: *build-linux | |
208 | image: registry.labs.nic.cz/labs/bird:debian-8-i386 | |
5c4dfe0c MV |
209 | |
210 | build-debian-9-amd64: | |
0adfa0ec OZ |
211 | <<: *build-linux |
212 | image: registry.labs.nic.cz/labs/bird:debian-9-amd64 | |
213 | ||
214 | build-debian-9-i386: | |
215 | <<: *build-linux | |
216 | image: registry.labs.nic.cz/labs/bird:debian-9-i386 | |
5c4dfe0c | 217 | |
92249894 MH |
218 | build-debian-10-amd64: |
219 | <<: *build-linux | |
220 | image: registry.labs.nic.cz/labs/bird:debian-10-amd64 | |
221 | ||
222 | build-debian-10-i386: | |
223 | <<: *build-linux | |
224 | image: registry.labs.nic.cz/labs/bird:debian-10-i386 | |
225 | ||
5c4dfe0c | 226 | build-debian-testing-amd64: |
0adfa0ec OZ |
227 | <<: *build-linux |
228 | image: registry.labs.nic.cz/labs/bird:debian-testing-amd64 | |
229 | ||
230 | build-debian-testing-i386: | |
231 | <<: *build-linux | |
232 | image: registry.labs.nic.cz/labs/bird:debian-testing-i386 | |
5c4dfe0c | 233 | |
5c4dfe0c | 234 | build-fedora-25-amd64: |
0adfa0ec OZ |
235 | <<: *build-linux |
236 | image: registry.labs.nic.cz/labs/bird:fedora-25-amd64 | |
5c4dfe0c | 237 | |
5c4dfe0c | 238 | build-fedora-26-amd64: |
0adfa0ec OZ |
239 | <<: *build-linux |
240 | image: registry.labs.nic.cz/labs/bird:fedora-26-amd64 | |
5c4dfe0c | 241 | |
92249894 MH |
242 | build-fedora-27-amd64: |
243 | <<: *build-linux | |
244 | image: registry.labs.nic.cz/labs/bird:fedora-27-amd64 | |
245 | ||
246 | build-fedora-28-amd64: | |
247 | <<: *build-linux | |
248 | image: registry.labs.nic.cz/labs/bird:fedora-28-amd64 | |
249 | ||
250 | build-fedora-29-amd64: | |
251 | <<: *build-linux | |
252 | image: registry.labs.nic.cz/labs/bird:fedora-29-amd64 | |
253 | ||
254 | build-fedora-30-amd64: | |
255 | <<: *build-linux | |
256 | image: registry.labs.nic.cz/labs/bird:fedora-30-amd64 | |
257 | ||
258 | build-fedora-31-amd64: | |
259 | <<: *build-linux | |
260 | image: registry.labs.nic.cz/labs/bird:fedora-31-amd64 | |
261 | ||
5c4dfe0c | 262 | build-centos-7-amd64: |
0adfa0ec OZ |
263 | <<: *build-linux |
264 | image: registry.labs.nic.cz/labs/bird:centos-7-amd64 | |
5c4dfe0c | 265 | |
92249894 | 266 | build-centos-8-amd64: |
0adfa0ec | 267 | <<: *build-linux |
92249894 | 268 | image: registry.labs.nic.cz/labs/bird:centos-8-amd64 |
5c4dfe0c | 269 | |
5c4dfe0c | 270 | build-ubuntu-14_04-amd64: |
0adfa0ec OZ |
271 | <<: *build-linux |
272 | image: registry.labs.nic.cz/labs/bird:ubuntu-14.04-amd64 | |
5c4dfe0c | 273 | |
5c4dfe0c | 274 | build-ubuntu-16_04-amd64: |
0adfa0ec OZ |
275 | <<: *build-linux |
276 | image: registry.labs.nic.cz/labs/bird:ubuntu-16.04-amd64 | |
5c4dfe0c | 277 | |
92249894 MH |
278 | build-ubuntu-18_04-amd64: |
279 | <<: *build-linux | |
280 | image: registry.labs.nic.cz/labs/bird:ubuntu-18.04-amd64 | |
281 | ||
282 | build-ubuntu-19_04-amd64: | |
283 | <<: *build-linux | |
284 | image: registry.labs.nic.cz/labs/bird:ubuntu-19.04-amd64 | |
285 | ||
286 | build-opensuse-15.0-amd64: | |
287 | <<: *build-linux | |
288 | image: registry.labs.nic.cz/labs/bird:opensuse-15.0-amd64 | |
289 | ||
290 | build-opensuse-15.1-amd64: | |
291 | <<: *build-linux | |
292 | image: registry.labs.nic.cz/labs/bird:opensuse-15.1-amd64 | |
293 | ||
5c4dfe0c | 294 | build-freebsd-11-amd64: |
0adfa0ec OZ |
295 | <<: *build-base |
296 | tags: | |
297 | - freebsd | |
298 | - amd64 | |
5c4dfe0c | 299 | |
5c4dfe0c | 300 | build-freebsd-11-i386: |
0adfa0ec OZ |
301 | <<: *build-base |
302 | tags: | |
303 | - freebsd | |
304 | - i386 | |
5176455f OZ |
305 | |
306 | build-birdlab: | |
faa43a75 | 307 | stage: build |
5176455f | 308 | tags: |
faa43a75 OZ |
309 | - birdlab |
310 | - amd64 | |
311 | script: | |
312 | - DIR=$(pwd) | |
313 | - autoreconf | |
314 | - ./configure | |
315 | - make | |
316 | - cd $TOOLS_DIR | |
317 | - sudo git clean -fx | |
318 | - git pull --ff-only | |
6a314d26 | 319 | - mv $DIR/bird $DIR/birdc netlab/common |
faa43a75 | 320 | |
0adfa0ec | 321 | .test: &test-base |
faa43a75 | 322 | stage: test |
148bd9ee | 323 | needs: [build-birdlab] |
faa43a75 OZ |
324 | tags: |
325 | - birdlab | |
326 | - amd64 | |
327 | script: | |
6a314d26 | 328 | - cd $TOOLS_DIR/netlab |
148bd9ee OZ |
329 | - sudo ./runtest -m check $TEST_NAME |
330 | ||
331 | test-ospf: | |
0adfa0ec | 332 | <<: *test-base |
148bd9ee OZ |
333 | variables: |
334 | TEST_NAME: cf-ospf |