2 DEBIAN_FRONTEND: noninteractive
5 DOCKER_CMD: docker --config="$HOME/.docker/$CI_JOB_ID/"
6 IMG_BASE: registry.labs.nic.cz/labs/bird
12 .docker: &docker_build
16 - $DOCKER_CMD login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.labs.nic.cz
17 # Make sure we refresh the base image if it updates (eg. security updates, etc)
18 # If we do just the build, cache is always reused and the freshness of the
19 # base image is never checked. However, pull always asks and updates the
20 # image only if it changed ‒ therefore, the cache is used unless there's a
22 - $DOCKER_CMD pull `sed -ne 's/^FROM //p' "misc/docker/$IMG_NAME/Dockerfile"`
23 - $DOCKER_CMD build -t "bird:$IMG_NAME" "misc/docker/$IMG_NAME"
24 - $DOCKER_CMD tag "bird:$IMG_NAME" "$IMG_BASE:$IMG_NAME"
25 - $DOCKER_CMD push "$IMG_BASE:$IMG_NAME"
27 - rm -f "$HOME/.docker/$CI_JOB_ID/" # cleanup the credentials
29 # That's Docker in Docker
32 docker_debian-7-amd64:
34 IMG_NAME: "debian-7-amd64"
37 docker_debian-8-amd64:
39 IMG_NAME: "debian-8-amd64"
42 docker_debian-9-amd64:
44 IMG_NAME: "debian-9-amd64"
47 docker_debian-testing-amd64:
49 IMG_NAME: "debian-testing-amd64"
54 IMG_NAME: "debian-7-i386"
59 IMG_NAME: "debian-8-i386"
64 IMG_NAME: "debian-9-i386"
67 docker_debian-testing-i386:
69 IMG_NAME: "debian-testing-i386"
72 docker_fedora-25-amd64:
74 IMG_NAME: "fedora-25-amd64"
77 docker_fedora-26-amd64:
79 IMG_NAME: "fedora-26-amd64"
82 docker_centos-6-amd64:
84 IMG_NAME: "centos-6-amd64"
87 docker_centos-7-amd64:
89 IMG_NAME: "centos-7-amd64"
92 docker_opensuse-42_3-amd64:
94 IMG_NAME: "opensuse-42.3-amd64"
97 docker_ubuntu-14_04-amd64:
99 IMG_NAME: "ubuntu-14.04-amd64"
102 docker_ubuntu-16_04-amd64:
104 IMG_NAME: "ubuntu-16.04-amd64"
107 .debian-7-i386: &debian-7-i386_env
108 image: registry.labs.nic.cz/labs/bird:debian-7-i386
114 .debian-8-i386: &debian-8-i386_env
115 image: registry.labs.nic.cz/labs/bird:debian-8-i386
121 .debian-9-i386: &debian-9-i386_env
122 image: registry.labs.nic.cz/labs/bird:debian-9-i386
128 .debian-testing-i386: &debian-testing-i386_env
129 image: registry.labs.nic.cz/labs/bird:debian-testing-i386
135 .debian-7-amd64: &debian-7-amd64_env
136 image: registry.labs.nic.cz/labs/bird:debian-7-amd64
142 .debian-8-amd64: &debian-8-amd64_env
143 image: registry.labs.nic.cz/labs/bird:debian-8-amd64
149 .debian-9-amd64: &debian-9-amd64_env
150 image: registry.labs.nic.cz/labs/bird:debian-9-amd64
156 .debian-testing-amd64: &debian-testing-amd64_env
157 image: registry.labs.nic.cz/labs/bird:debian-testing-amd64
163 .fedora-25-amd64: &fedora-25-amd64_env
164 image: registry.labs.nic.cz/labs/bird:fedora-25-amd64
170 .fedora-26-amd64: &fedora-26-amd64_env
171 image: registry.labs.nic.cz/labs/bird:fedora-26-amd64
177 .centos-6-amd64: ¢os-6-amd64_env
178 image: registry.labs.nic.cz/labs/bird:centos-6-amd64
184 .centos-7-amd64: ¢os-7-amd64_env
185 image: registry.labs.nic.cz/labs/bird:centos-7-amd64
191 .opensuse-42_3-amd64: &opensuse-42_3-amd64_env
192 image: registry.labs.nic.cz/labs/bird:opensuse-42.3-amd64
198 .ubuntu-14_04-amd64: &ubuntu-14_04-amd64_env
199 image: registry.labs.nic.cz/labs/bird:ubuntu-14.04-amd64
205 .ubuntu-16_04-amd64: &ubuntu-16_04-amd64_env
206 image: registry.labs.nic.cz/labs/bird:ubuntu-16.04-amd64
212 # TODO We want to copy these BSDs to our own virtual machines, to make sure someone doesn't update them by accident.
213 .freebsd-11-i386: &freebsd-11-i386_env
222 .freebsd-11-amd64: &freebsd-11-amd64_env
235 - ./configure CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS"
236 # Detect which make is available
238 - which gmake 2>/dev/null >/dev/null && MAKE=gmake
240 # Run tests if they are available
243 build-debian-7-amd64:
244 <<: *debian-7-amd64_env
247 build-debian-8-amd64:
248 <<: *debian-8-amd64_env
251 build-debian-9-amd64:
252 <<: *debian-9-amd64_env
255 build-debian-testing-amd64:
256 <<: *debian-testing-amd64_env
259 build-fedora-25-amd64:
260 <<: *fedora-25-amd64_env
263 build-fedora-26-amd64:
264 <<: *fedora-26-amd64_env
267 build-centos-6-amd64:
268 <<: *centos-6-amd64_env
271 build-centos-7-amd64:
272 <<: *centos-7-amd64_env
275 build-opensuse-42_3-amd64:
276 <<: *opensuse-42_3-amd64_env
279 build-ubuntu-14_04-amd64:
280 <<: *ubuntu-14_04-amd64_env
283 build-ubuntu-16_04-amd64:
284 <<: *ubuntu-16_04-amd64_env
288 <<: *debian-7-i386_env
292 <<: *debian-8-i386_env
296 <<: *debian-9-i386_env
299 build-debian-testing-i386:
300 <<: *debian-testing-i386_env
303 build-freebsd-11-amd64:
304 <<: *freebsd-11-amd64_env
307 build-freebsd-11-i386:
308 <<: *freebsd-11-i386_env