]> git.ipfire.org Git - thirdparty/bird.git/blob - .gitlab-ci.yml
Merge commit '54ddf90f'
[thirdparty/bird.git] / .gitlab-ci.yml
1 variables:
2 DEBIAN_FRONTEND: noninteractive
3 LC_ALL: C.UTF-8
4 GIT_STRATEGY: fetch
5 DOCKER_CMD: docker --config="$HOME/.docker/$CI_JOB_ID/"
6 IMG_BASE: registry.nic.cz/labs/bird
7 TOOLS_DIR: /home/gitlab-runner/bird-tools
8 STAYRTR_BINARY: /usr/bin/stayrtr
9
10 stages:
11 # - image
12 - build
13 - pkg
14 - test
15
16 .docker: &docker_build
17 stage: image
18 allow_failure: true
19 script:
20 - $DOCKER_CMD login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.nic.cz
21 # Make sure we refresh the base image if it updates (eg. security updates, etc)
22 # If we do just the build, cache is always reused and the freshness of the
23 # base image is never checked. However, pull always asks and updates the
24 # image only if it changed ‒ therefore, the cache is used unless there's a
25 # change.
26 - $DOCKER_CMD pull `sed -ne 's/^FROM //p' "misc/docker/$IMG_NAME/Dockerfile"`
27 - $DOCKER_CMD build -t "bird:$IMG_NAME" "misc/docker/$IMG_NAME"
28 - $DOCKER_CMD tag "bird:$IMG_NAME" "$IMG_BASE:$IMG_NAME"
29 - $DOCKER_CMD push "$IMG_BASE:$IMG_NAME"
30 after_script:
31 - rm -f "$HOME/.docker/$CI_JOB_ID/" # cleanup the credentials
32 tags:
33 # That's Docker in Docker
34 - dind
35
36 # Docker build example
37 #docker_debian-11-amd64:
38 # variables:
39 # IMG_NAME: "debian-11-amd64"
40 # <<: *docker_build
41
42
43 .build: &build-base
44 stage: build
45 script:
46 - autoreconf
47 - ./configure CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS"
48 # Detect which make is available
49 - MAKE=make
50 - which gmake 2>/dev/null >/dev/null && MAKE=gmake
51 - $MAKE
52 - $MAKE check
53 # Build docs when tools are available
54 - if which linuxdoc pdflatex >/dev/null ; then $MAKE docs ; fi
55
56 .build-linux: &build-linux
57 <<: *build-base
58 tags:
59 - docker
60 - linux
61 - amd64
62
63 build-debian-9-amd64:
64 <<: *build-linux
65 image: registry.nic.cz/labs/bird:debian-9-amd64
66
67 build-debian-9-i386:
68 <<: *build-linux
69 image: registry.nic.cz/labs/bird:debian-9-i386
70
71 build-debian-10-amd64:
72 <<: *build-linux
73 image: registry.nic.cz/labs/bird:debian-10-amd64
74
75 build-debian-10-i386:
76 <<: *build-linux
77 image: registry.nic.cz/labs/bird:debian-10-i386
78
79 build-debian-11-amd64:
80 <<: *build-linux
81 image: registry.nic.cz/labs/bird:debian-11-amd64
82
83 #build-debian-11-i386:
84 # <<: *build-linux
85 # image: registry.nic.cz/labs/bird:debian-11-i386
86
87 build-debian-testing-amd64:
88 <<: *build-linux
89 image: registry.nic.cz/labs/bird:debian-testing-amd64
90
91 #build-debian-testing-i386:
92 # <<: *build-linux
93 # image: registry.nic.cz/labs/bird:debian-testing-i386
94
95 build-fedora-25-amd64:
96 <<: *build-linux
97 image: registry.nic.cz/labs/bird:fedora-25-amd64
98
99 build-fedora-26-amd64:
100 <<: *build-linux
101 image: registry.nic.cz/labs/bird:fedora-26-amd64
102
103 build-fedora-27-amd64:
104 <<: *build-linux
105 image: registry.nic.cz/labs/bird:fedora-27-amd64
106
107 build-fedora-28-amd64:
108 <<: *build-linux
109 image: registry.nic.cz/labs/bird:fedora-28-amd64
110
111 build-fedora-29-amd64:
112 <<: *build-linux
113 image: registry.nic.cz/labs/bird:fedora-29-amd64
114
115 build-fedora-30-amd64:
116 <<: *build-linux
117 image: registry.nic.cz/labs/bird:fedora-30-amd64
118
119 build-fedora-31-amd64:
120 <<: *build-linux
121 image: registry.nic.cz/labs/bird:fedora-31-amd64
122
123 build-fedora-32-amd64:
124 <<: *build-linux
125 image: registry.nic.cz/labs/bird:fedora-32-amd64
126
127 build-fedora-33-amd64:
128 <<: *build-linux
129 image: registry.nic.cz/labs/bird:fedora-33-amd64
130
131 build-fedora-34-amd64:
132 <<: *build-linux
133 image: registry.nic.cz/labs/bird:fedora-33-amd64
134
135 #build-centos-7-amd64:
136 # <<: *build-linux
137 # image: registry.nic.cz/labs/bird:centos-7-amd64
138
139 build-centos-8-amd64:
140 <<: *build-linux
141 image: registry.nic.cz/labs/bird:centos-8-amd64
142
143 build-ubuntu-16_04-amd64:
144 <<: *build-linux
145 image: registry.nic.cz/labs/bird:ubuntu-16.04-amd64
146
147 build-ubuntu-18_04-amd64:
148 <<: *build-linux
149 image: registry.nic.cz/labs/bird:ubuntu-18.04-amd64
150
151 build-ubuntu-20_04-amd64:
152 <<: *build-linux
153 image: registry.nic.cz/labs/bird:ubuntu-20.04-amd64
154
155 build-ubuntu-21_10-amd64:
156 <<: *build-linux
157 image: registry.nic.cz/labs/bird:ubuntu-21.10-amd64
158
159 #build-ubuntu-21_04-amd64:
160 # <<: *build-linux
161 # image: registry.nic.cz/labs/bird:ubuntu-21.04-amd64
162
163 build-opensuse-15.0-amd64:
164 <<: *build-linux
165 image: registry.nic.cz/labs/bird:opensuse-15.0-amd64
166
167 build-opensuse-15.1-amd64:
168 <<: *build-linux
169 image: registry.nic.cz/labs/bird:opensuse-15.1-amd64
170
171 build-opensuse-15.2-amd64:
172 <<: *build-linux
173 image: registry.nic.cz/labs/bird:opensuse-15.2-amd64
174
175 build-opensuse-15.3-amd64:
176 <<: *build-linux
177 image: registry.nic.cz/labs/bird:opensuse-15.3-amd64
178
179 #build-freebsd-11-amd64:
180 # <<: *build-base
181 # tags:
182 # - freebsd
183 # - amd64
184
185 #build-freebsd-11-i386:
186 # <<: *build-base
187 # tags:
188 # - freebsd
189 # - i386
190
191
192 .pkg-deb: &pkg-deb
193 stage: pkg
194 script:
195 - pip3 install apkg
196 - apkg build
197 #- apkg install -y pkg/pkgs/*/*/*.deb
198 artifacts:
199 paths:
200 - pkg/pkgs/*
201
202 .pkg-rpm: &pkg-rpm
203 stage: pkg
204 script:
205 - pip3 install apkg
206 - apkg build
207 #- apkg install -y pkg/pkgs/*/*/*.rpm
208 artifacts:
209 paths:
210 - pkg/pkgs/*
211
212 .pkg-rpm-wa: &pkg-rpm-wa
213 stage: pkg
214 script:
215 - sed -i "s/runstatedir/with-runtimedir/" distro/pkg/rpm/bird.spec
216 - pip3 install apkg
217 - apkg build
218 #- apkg install -y pkg/pkgs/*/*/*.rpm
219 artifacts:
220 paths:
221 - pkg/pkgs/*
222
223 pkg-debian-10-amd64:
224 <<: *pkg-deb
225 needs: [build-debian-10-amd64]
226 image: registry.nic.cz/labs/bird:debian-10-amd64
227
228 pkg-debian-10-i386:
229 <<: *pkg-deb
230 needs: [build-debian-10-i386]
231 image: registry.nic.cz/labs/bird:debian-10-i386
232
233 pkg-debian-11-amd64:
234 <<: *pkg-deb
235 needs: [build-debian-11-amd64]
236 image: registry.nic.cz/labs/bird:debian-11-amd64
237
238 pkg-fedora-30-amd64:
239 <<: *pkg-rpm-wa
240 needs: [build-fedora-30-amd64]
241 image: registry.nic.cz/labs/bird:fedora-30-amd64
242
243 pkg-fedora-31-amd64:
244 <<: *pkg-rpm-wa
245 needs: [build-fedora-31-amd64]
246 image: registry.nic.cz/labs/bird:fedora-31-amd64
247
248 pkg-fedora-32-amd64:
249 <<: *pkg-rpm-wa
250 needs: [build-fedora-32-amd64]
251 image: registry.nic.cz/labs/bird:fedora-32-amd64
252
253 pkg-fedora-33-amd64:
254 <<: *pkg-rpm-wa
255 needs: [build-fedora-33-amd64]
256 image: registry.nic.cz/labs/bird:fedora-33-amd64
257
258 pkg-fedora-34-amd64:
259 <<: *pkg-rpm
260 needs: [build-fedora-34-amd64]
261 image: registry.nic.cz/labs/bird:fedora-34-amd64
262
263 #pkg-centos-7-amd64:
264 # <<: *pkg-rpm-wa
265 # variables:
266 # LC_ALL: en_US.UTF-8
267 # needs: [build-centos-7-amd64]
268 # image: registry.nic.cz/labs/bird:centos-7-amd64
269
270 pkg-centos-8-amd64:
271 <<: *pkg-rpm-wa
272 needs: [build-centos-8-amd64]
273 image: registry.nic.cz/labs/bird:centos-8-amd64
274
275 pkg-ubuntu-18.04-amd64:
276 <<: *pkg-deb
277 needs: [build-ubuntu-18_04-amd64]
278 image: registry.nic.cz/labs/bird:ubuntu-18.04-amd64
279
280 pkg-ubuntu-20.04-amd64:
281 <<: *pkg-deb
282 needs: [build-ubuntu-20_04-amd64]
283 image: registry.nic.cz/labs/bird:ubuntu-20.04-amd64
284
285
286 pkg-ubuntu-21.10-amd64:
287 <<: *pkg-deb
288 needs: [build-ubuntu-21_10-amd64]
289 image: registry.nic.cz/labs/bird:ubuntu-21.10-amd64
290
291 #pkg-ubuntu-21.04-amd64:
292 # <<: *pkg-deb
293 # needs: [build-ubuntu-21_04-amd64]
294 # image: registry.nic.cz/labs/bird:ubuntu-21.04-amd64
295
296 pkg-opensuse-15.1-amd64:
297 <<: *pkg-rpm-wa
298 needs: [build-opensuse-15.1-amd64]
299 image: registry.nic.cz/labs/bird:opensuse-15.1-amd64
300
301 pkg-opensuse-15.2-amd64:
302 <<: *pkg-rpm-wa
303 needs: [build-opensuse-15.2-amd64]
304 image: registry.nic.cz/labs/bird:opensuse-15.2-amd64
305
306 pkg-opensuse-15.3-amd64:
307 <<: *pkg-rpm-wa
308 needs: [build-opensuse-15.3-amd64]
309 image: registry.nic.cz/labs/bird:opensuse-15.3-amd64
310
311
312 build-netlab:
313 stage: build
314 tags:
315 - netlab
316 - amd64
317 script:
318 - DIR=$(pwd)
319 - autoreconf
320 - ./configure
321 - make
322 - cd $TOOLS_DIR
323 - sudo git clean -fx
324 - git pull --ff-only
325 - mv $DIR/bird $DIR/birdc netlab/common
326 - ln -s $STAYRTR_BINARY netlab/common/stayrtr
327
328 .test: &test-base
329 stage: test
330 needs: [build-netlab]
331 tags:
332 - netlab
333 - amd64
334 script:
335 - cd $TOOLS_DIR/netlab
336 - sudo ./stop
337 - sudo ./runtest -s v2 -m check $TEST_NAME
338
339 test-ospf-base:
340 <<: *test-base
341 variables:
342 TEST_NAME: cf-ospf-base
343
344 test-ospf-default:
345 <<: *test-base
346 variables:
347 TEST_NAME: cf-ospf-default
348
349 test-ospf-priority:
350 <<: *test-base
351 variables:
352 TEST_NAME: cf-ospf-priority
353
354 test-ospf-nbma:
355 <<: *test-base
356 variables:
357 TEST_NAME: cf-ospf-nbma
358
359 test-ospf-ptmp:
360 <<: *test-base
361 variables:
362 TEST_NAME: cf-ospf-ptmp
363
364 test-ospf-authentication:
365 <<: *test-base
366 variables:
367 TEST_NAME: cf-ospf-authentication
368
369 test-ospf-bfd:
370 <<: *test-base
371 variables:
372 TEST_NAME: cf-ospf-bfd
373
374 test-ospf-custom:
375 <<: *test-base
376 variables:
377 TEST_NAME: cf-ospf-custom
378
379 test-ospf-area:
380 <<: *test-base
381 variables:
382 TEST_NAME: cf-ospf-area
383
384 test-ospf-vrf:
385 <<: *test-base
386 variables:
387 TEST_NAME: cf-ospf-vrf
388
389 test-bgp-base:
390 <<: *test-base
391 variables:
392 TEST_NAME: cf-bgp-base
393
394 test-bgp-auth:
395 <<: *test-base
396 variables:
397 TEST_NAME: cf-bgp-auth
398
399 test-bgp-int:
400 <<: *test-base
401 variables:
402 TEST_NAME: cf-bgp-int
403
404 test-bgp-merged:
405 <<: *test-base
406 variables:
407 TEST_NAME: cf-bgp-merged
408
409 test-bgp-flowspec:
410 <<: *test-base
411 variables:
412 TEST_NAME: cf-bgp-flowspec
413
414 test-bgp-rs-multitab:
415 <<: *test-base
416 variables:
417 TEST_NAME: cf-bgp-rs-multitab
418
419 test-ebgp-loop:
420 <<: *test-base
421 variables:
422 TEST_NAME: cf-ebgp-loop
423
424 test-ebgp-star:
425 <<: *test-base
426 variables:
427 TEST_NAME: cf-ebgp-star
428
429 test-ebgp-role:
430 <<: *test-base
431 variables:
432 TEST_NAME: cf-ebgp-role
433
434 test-ebgp-graceful:
435 <<: *test-base
436 variables:
437 TEST_NAME: cf-ebgp-graceful
438
439 test-ebgp-import-limit:
440 <<: *test-base
441 variables:
442 TEST_NAME: cf-ebgp-import-limit
443
444 test-ibgp-loop:
445 <<: *test-base
446 variables:
447 TEST_NAME: cf-ibgp-loop
448
449 test-ibgp-loop-big:
450 <<: *test-base
451 variables:
452 TEST_NAME: cf-ibgp-loop-big
453
454 test-ibgp-flat:
455 <<: *test-base
456 variables:
457 TEST_NAME: cf-ibgp-flat
458
459 test-babel-base:
460 <<: *test-base
461 variables:
462 TEST_NAME: cf-babel-base
463
464 test-babel-auth:
465 <<: *test-base
466 variables:
467 TEST_NAME: cf-babel-auth
468
469 test-rip-base:
470 <<: *test-base
471 variables:
472 TEST_NAME: cf-rip-base
473
474 test-kernel-learn:
475 <<: *test-base
476 variables:
477 TEST_NAME: cf-kernel-learn
478
479 test-mpls-bgp:
480 <<: *test-base
481 variables:
482 TEST_NAME: cf-mpls-bgp
483
484 test-mpls-bgp-l3vpn:
485 <<: *test-base
486 variables:
487 TEST_NAME: cf-mpls-bgp-l3vpn
488
489
490 .build-birdlab-base: &build-birdlab-base
491 stage: build
492 script:
493 - autoreconf
494 - ./configure
495 - gmake
496 - gmake check
497
498 build-birdlab-debian-11:
499 <<: *build-birdlab-base
500 tags:
501 - birdlab-debian-11
502 - amd64
503
504 build-birdlab-centos-08:
505 <<: *build-birdlab-base
506 tags:
507 - birdlab-centos-08
508 - amd64
509
510 build-birdlab-fedora-37:
511 <<: *build-birdlab-base
512 tags:
513 - birdlab-fedora-37
514 - amd64
515
516 build-birdlab-freebsd-13:
517 <<: *build-birdlab-base
518 tags:
519 - birdlab-freebsd-13
520 - amd64
521
522 build-birdlab-openbsd-71:
523 <<: *build-birdlab-base
524 variables:
525 AUTOCONF_VERSION: "2.71"
526 tags:
527 - birdlab-openbsd-71
528 - amd64