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-7-amd64:
84 IMG_NAME: "centos-7-amd64"
87 docker_opensuse-42_3-amd64:
89 IMG_NAME: "opensuse-42.3-amd64"
92 docker_ubuntu-14_04-amd64:
94 IMG_NAME: "ubuntu-14.04-amd64"
97 docker_ubuntu-16_04-amd64:
99 IMG_NAME: "ubuntu-16.04-amd64"
102 .debian-7-i386: &debian-7-i386_env
103 image: registry.labs.nic.cz/labs/bird:debian-7-i386
109 .debian-8-i386: &debian-8-i386_env
110 image: registry.labs.nic.cz/labs/bird:debian-8-i386
116 .debian-9-i386: &debian-9-i386_env
117 image: registry.labs.nic.cz/labs/bird:debian-9-i386
123 .debian-testing-i386: &debian-testing-i386_env
124 image: registry.labs.nic.cz/labs/bird:debian-testing-i386
130 .debian-7-amd64: &debian-7-amd64_env
131 image: registry.labs.nic.cz/labs/bird:debian-7-amd64
137 .debian-8-amd64: &debian-8-amd64_env
138 image: registry.labs.nic.cz/labs/bird:debian-8-amd64
144 .debian-9-amd64: &debian-9-amd64_env
145 image: registry.labs.nic.cz/labs/bird:debian-9-amd64
151 .debian-testing-amd64: &debian-testing-amd64_env
152 image: registry.labs.nic.cz/labs/bird:debian-testing-amd64
158 .fedora-25-amd64: &fedora-25-amd64_env
159 image: registry.labs.nic.cz/labs/bird:fedora-25-amd64
165 .fedora-26-amd64: &fedora-26-amd64_env
166 image: registry.labs.nic.cz/labs/bird:fedora-26-amd64
172 .centos-7-amd64: ¢os-7-amd64_env
173 image: registry.labs.nic.cz/labs/bird:centos-7-amd64
179 .opensuse-42_3-amd64: &opensuse-42_3-amd64_env
180 image: registry.labs.nic.cz/labs/bird:opensuse-42.3-amd64
186 .ubuntu-14_04-amd64: &ubuntu-14_04-amd64_env
187 image: registry.labs.nic.cz/labs/bird:ubuntu-14.04-amd64
193 .ubuntu-16_04-amd64: &ubuntu-16_04-amd64_env
194 image: registry.labs.nic.cz/labs/bird:ubuntu-16.04-amd64
200 # TODO We want to copy these BSDs to our own virtual machines, to make sure someone doesn't update them by accident.
201 .freebsd-11-i386: &freebsd-11-i386_env
210 .freebsd-11-amd64: &freebsd-11-amd64_env
223 - ./configure CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS"
224 # Detect which make is available
226 - which gmake 2>/dev/null >/dev/null && MAKE=gmake
228 # Run tests if they are available
231 build-debian-7-amd64:
232 <<: *debian-7-amd64_env
235 build-debian-8-amd64:
236 <<: *debian-8-amd64_env
239 build-debian-9-amd64:
240 <<: *debian-9-amd64_env
243 build-debian-testing-amd64:
244 <<: *debian-testing-amd64_env
247 build-fedora-25-amd64:
248 <<: *fedora-25-amd64_env
251 build-fedora-26-amd64:
252 <<: *fedora-26-amd64_env
255 build-centos-7-amd64:
256 <<: *centos-7-amd64_env
259 build-opensuse-42_3-amd64:
260 <<: *opensuse-42_3-amd64_env
263 build-ubuntu-14_04-amd64:
264 <<: *ubuntu-14_04-amd64_env
267 build-ubuntu-16_04-amd64:
268 <<: *ubuntu-16_04-amd64_env
272 <<: *debian-7-i386_env
276 <<: *debian-8-i386_env
280 <<: *debian-9-i386_env
283 build-debian-testing-i386:
284 <<: *debian-testing-i386_env
287 build-freebsd-11-amd64:
288 <<: *freebsd-11-amd64_env
291 build-freebsd-11-i386:
292 <<: *freebsd-11-i386_env