]> git.ipfire.org Git - thirdparty/bird.git/blame - .gitlab-ci.yml
Perf: Prune the table after every loop to have clean state.
[thirdparty/bird.git] / .gitlab-ci.yml
CommitLineData
5c4dfe0c
MV
1variables:
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
7
8stages:
9 - image
10 - build
11
12.docker: &docker_build
13 stage: image
14 allow_failure: true
15 script:
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
21 # change.
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"
26 after_script:
27 - rm -f "$HOME/.docker/$CI_JOB_ID/" # cleanup the credentials
28 tags:
29 # That's Docker in Docker
30 - dind
31
32docker_debian-7-amd64:
33 variables:
34 IMG_NAME: "debian-7-amd64"
35 <<: *docker_build
36
37docker_debian-8-amd64:
38 variables:
39 IMG_NAME: "debian-8-amd64"
40 <<: *docker_build
41
42docker_debian-9-amd64:
43 variables:
44 IMG_NAME: "debian-9-amd64"
45 <<: *docker_build
46
47docker_debian-testing-amd64:
48 variables:
49 IMG_NAME: "debian-testing-amd64"
50 <<: *docker_build
51
52docker_debian-7-i386:
53 variables:
54 IMG_NAME: "debian-7-i386"
55 <<: *docker_build
56
57docker_debian-8-i386:
58 variables:
59 IMG_NAME: "debian-8-i386"
60 <<: *docker_build
61
62docker_debian-9-i386:
63 variables:
64 IMG_NAME: "debian-9-i386"
65 <<: *docker_build
66
67docker_debian-testing-i386:
68 variables:
69 IMG_NAME: "debian-testing-i386"
70 <<: *docker_build
71
72docker_fedora-25-amd64:
73 variables:
74 IMG_NAME: "fedora-25-amd64"
75 <<: *docker_build
76
77docker_fedora-26-amd64:
78 variables:
79 IMG_NAME: "fedora-26-amd64"
80 <<: *docker_build
81
82docker_centos-6-amd64:
83 variables:
84 IMG_NAME: "centos-6-amd64"
85 <<: *docker_build
86
87docker_centos-7-amd64:
88 variables:
89 IMG_NAME: "centos-7-amd64"
90 <<: *docker_build
91
92docker_opensuse-42_3-amd64:
93 variables:
94 IMG_NAME: "opensuse-42.3-amd64"
95 <<: *docker_build
96
97docker_ubuntu-14_04-amd64:
98 variables:
99 IMG_NAME: "ubuntu-14.04-amd64"
100 <<: *docker_build
101
102docker_ubuntu-16_04-amd64:
103 variables:
104 IMG_NAME: "ubuntu-16.04-amd64"
105 <<: *docker_build
106
107.debian-7-i386: &debian-7-i386_env
108 image: registry.labs.nic.cz/labs/bird:debian-7-i386
109 tags:
110 - docker
111 - linux
112 - amd64
113
114.debian-8-i386: &debian-8-i386_env
115 image: registry.labs.nic.cz/labs/bird:debian-8-i386
116 tags:
117 - docker
118 - linux
119 - amd64
120
121.debian-9-i386: &debian-9-i386_env
122 image: registry.labs.nic.cz/labs/bird:debian-9-i386
123 tags:
124 - docker
125 - linux
126 - amd64
127
128.debian-testing-i386: &debian-testing-i386_env
129 image: registry.labs.nic.cz/labs/bird:debian-testing-i386
130 tags:
131 - docker
132 - linux
133 - amd64
134
135.debian-7-amd64: &debian-7-amd64_env
136 image: registry.labs.nic.cz/labs/bird:debian-7-amd64
137 tags:
138 - docker
139 - linux
140 - amd64
141
142.debian-8-amd64: &debian-8-amd64_env
143 image: registry.labs.nic.cz/labs/bird:debian-8-amd64
144 tags:
145 - docker
146 - linux
147 - amd64
148
149.debian-9-amd64: &debian-9-amd64_env
150 image: registry.labs.nic.cz/labs/bird:debian-9-amd64
151 tags:
152 - docker
153 - linux
154 - amd64
155
156.debian-testing-amd64: &debian-testing-amd64_env
157 image: registry.labs.nic.cz/labs/bird:debian-testing-amd64
158 tags:
159 - docker
160 - linux
161 - amd64
162
163.fedora-25-amd64: &fedora-25-amd64_env
164 image: registry.labs.nic.cz/labs/bird:fedora-25-amd64
165 tags:
166 - docker
167 - linux
168 - amd64
169
170.fedora-26-amd64: &fedora-26-amd64_env
171 image: registry.labs.nic.cz/labs/bird:fedora-26-amd64
172 tags:
173 - docker
174 - linux
175 - amd64
176
177.centos-6-amd64: &centos-6-amd64_env
178 image: registry.labs.nic.cz/labs/bird:centos-6-amd64
179 tags:
180 - docker
181 - linux
182 - amd64
183
184.centos-7-amd64: &centos-7-amd64_env
185 image: registry.labs.nic.cz/labs/bird:centos-7-amd64
186 tags:
187 - docker
188 - linux
189 - amd64
190
191.opensuse-42_3-amd64: &opensuse-42_3-amd64_env
192 image: registry.labs.nic.cz/labs/bird:opensuse-42.3-amd64
193 tags:
194 - docker
195 - linux
196 - amd64
197
198.ubuntu-14_04-amd64: &ubuntu-14_04-amd64_env
199 image: registry.labs.nic.cz/labs/bird:ubuntu-14.04-amd64
200 tags:
201 - docker
202 - linux
203 - amd64
204
205.ubuntu-16_04-amd64: &ubuntu-16_04-amd64_env
206 image: registry.labs.nic.cz/labs/bird:ubuntu-16.04-amd64
207 tags:
208 - docker
209 - linux
210 - amd64
211
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
5c4dfe0c
MV
214 tags:
215 - freebsd
216 - i386
217 #only:
218 #- master
219 #- triggers
220 #- tags
221
222.freebsd-11-amd64: &freebsd-11-amd64_env
5c4dfe0c
MV
223 tags:
224 - freebsd
225 - amd64
226 #only:
227 #- master
228 #- triggers
229 #- tags
230
231.build: &build_job
232 stage: build
233 script:
234 - autoreconf
4ff15a75 235 - ./configure CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS"
5c4dfe0c
MV
236 # Detect which make is available
237 - MAKE=make
238 - which gmake 2>/dev/null >/dev/null && MAKE=gmake
239 - $MAKE
cb5df823
OZ
240 # Run tests if they are available
241 - $MAKE check
5c4dfe0c
MV
242
243build-debian-7-amd64:
5c4dfe0c
MV
244 <<: *debian-7-amd64_env
245 <<: *build_job
246
247build-debian-8-amd64:
5c4dfe0c
MV
248 <<: *debian-8-amd64_env
249 <<: *build_job
250
251build-debian-9-amd64:
5c4dfe0c
MV
252 <<: *debian-9-amd64_env
253 <<: *build_job
254
255build-debian-testing-amd64:
5c4dfe0c
MV
256 <<: *debian-testing-amd64_env
257 <<: *build_job
258
5c4dfe0c 259build-fedora-25-amd64:
5c4dfe0c
MV
260 <<: *fedora-25-amd64_env
261 <<: *build_job
262
5c4dfe0c 263build-fedora-26-amd64:
5c4dfe0c
MV
264 <<: *fedora-26-amd64_env
265 <<: *build_job
266
5c4dfe0c 267build-centos-6-amd64:
5c4dfe0c
MV
268 <<: *centos-6-amd64_env
269 <<: *build_job
270
5c4dfe0c 271build-centos-7-amd64:
5c4dfe0c
MV
272 <<: *centos-7-amd64_env
273 <<: *build_job
274
5c4dfe0c 275build-opensuse-42_3-amd64:
5c4dfe0c
MV
276 <<: *opensuse-42_3-amd64_env
277 <<: *build_job
278
5c4dfe0c 279build-ubuntu-14_04-amd64:
5c4dfe0c
MV
280 <<: *ubuntu-14_04-amd64_env
281 <<: *build_job
282
5c4dfe0c 283build-ubuntu-16_04-amd64:
5c4dfe0c
MV
284 <<: *ubuntu-16_04-amd64_env
285 <<: *build_job
286
5c4dfe0c 287build-debian-7-i386:
5c4dfe0c
MV
288 <<: *debian-7-i386_env
289 <<: *build_job
290
5c4dfe0c 291build-debian-8-i386:
5c4dfe0c
MV
292 <<: *debian-8-i386_env
293 <<: *build_job
294
5c4dfe0c 295build-debian-9-i386:
5c4dfe0c
MV
296 <<: *debian-9-i386_env
297 <<: *build_job
298
5c4dfe0c 299build-debian-testing-i386:
5c4dfe0c
MV
300 <<: *debian-testing-i386_env
301 <<: *build_job
302
5c4dfe0c 303build-freebsd-11-amd64:
5c4dfe0c
MV
304 <<: *freebsd-11-amd64_env
305 <<: *build_job
306
5c4dfe0c 307build-freebsd-11-i386:
5c4dfe0c
MV
308 <<: *freebsd-11-i386_env
309 <<: *build_job