xref: /openbmc/qemu/.gitlab-ci.d/containers.yml (revision e6546342)
1.container_job_template: &container_job_definition
2  image: docker:stable
3  stage: containers
4  services:
5    - docker:dind
6  before_script:
7    - export TAG="$CI_REGISTRY_IMAGE/qemu/$NAME:latest"
8    - export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/$NAME:latest"
9    - apk add python3
10    - docker info
11    - docker login registry.gitlab.com -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
12  script:
13    - echo "TAG:$TAG"
14    - echo "COMMON_TAG:$COMMON_TAG"
15    - docker pull "$TAG" || docker pull "$COMMON_TAG" || true
16    - ./tests/docker/docker.py --engine docker build
17          -t "qemu/$NAME" -f "tests/docker/dockerfiles/$NAME.docker"
18          -r $CI_REGISTRY_IMAGE
19    - docker tag "qemu/$NAME" "$TAG"
20    - docker push "$TAG"
21  after_script:
22    - docker logout
23  rules:
24    - changes:
25      - .gitlab-ci.d/containers.yml
26      - tests/docker/*
27      - tests/docker/dockerfiles/*
28    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
29    - if: '$CI_COMMIT_REF_NAME == "testing/next"'
30
31amd64-centos7-container:
32  <<: *container_job_definition
33  variables:
34    NAME: centos7
35
36amd64-centos8-container:
37  <<: *container_job_definition
38  variables:
39    NAME: centos8
40
41amd64-debian10-container:
42  <<: *container_job_definition
43  variables:
44    NAME: debian10
45
46amd64-debian11-container:
47  <<: *container_job_definition
48  variables:
49    NAME: debian11
50
51amd64-debian9-container:
52  <<: *container_job_definition
53  variables:
54    NAME: debian9
55
56amd64-debian9-mxe-container:
57  <<: *container_job_definition
58  stage: containers-layer2
59  needs: ['amd64-debian9-container']
60  variables:
61    NAME: debian9-mxe
62
63alpha-debian-cross-container:
64  <<: *container_job_definition
65  stage: containers-layer2
66  needs: ['amd64-debian10-container']
67  variables:
68    NAME: debian-alpha-cross
69
70amd64-debian-cross-container:
71  <<: *container_job_definition
72  stage: containers-layer2
73  needs: ['amd64-debian10-container']
74  variables:
75    NAME: debian-amd64-cross
76
77amd64-debian-user-cross-container:
78  <<: *container_job_definition
79  stage: containers-layer2
80  needs: ['amd64-debian10-container']
81  variables:
82    NAME: debian-all-test-cross
83
84amd64-debian-container:
85  <<: *container_job_definition
86  stage: containers-layer2
87  needs: ['amd64-debian10-container']
88  variables:
89    NAME: debian-amd64
90
91arm64-debian-cross-container:
92  <<: *container_job_definition
93  stage: containers-layer2
94  needs: ['amd64-debian10-container']
95  variables:
96    NAME: debian-arm64-cross
97
98arm64-test-debian-cross-container:
99  <<: *container_job_definition
100  stage: containers-layer2
101  needs: ['amd64-debian11-container']
102  variables:
103    NAME: debian-arm64-test-cross
104
105armel-debian-cross-container:
106  <<: *container_job_definition
107  stage: containers-layer2
108  needs: ['amd64-debian10-container']
109  variables:
110    NAME: debian-armel-cross
111
112armhf-debian-cross-container:
113  <<: *container_job_definition
114  stage: containers-layer2
115  needs: ['amd64-debian10-container']
116  variables:
117    NAME: debian-armhf-cross
118
119hppa-debian-cross-container:
120  <<: *container_job_definition
121  stage: containers-layer2
122  needs: ['amd64-debian10-container']
123  variables:
124    NAME: debian-hppa-cross
125
126m68k-debian-cross-container:
127  <<: *container_job_definition
128  stage: containers-layer2
129  needs: ['amd64-debian10-container']
130  variables:
131    NAME: debian-m68k-cross
132
133mips64-debian-cross-container:
134  <<: *container_job_definition
135  stage: containers-layer2
136  needs: ['amd64-debian10-container']
137  variables:
138    NAME: debian-mips64-cross
139
140mips64el-debian-cross-container:
141  <<: *container_job_definition
142  stage: containers-layer2
143  needs: ['amd64-debian10-container']
144  variables:
145    NAME: debian-mips64el-cross
146
147mips-debian-cross-container:
148  <<: *container_job_definition
149  stage: containers-layer2
150  needs: ['amd64-debian10-container']
151  variables:
152    NAME: debian-mips-cross
153
154mipsel-debian-cross-container:
155  <<: *container_job_definition
156  stage: containers-layer2
157  needs: ['amd64-debian10-container']
158  variables:
159    NAME: debian-mipsel-cross
160
161powerpc-debian-cross-container:
162  <<: *container_job_definition
163  stage: containers-layer2
164  needs: ['amd64-debian10-container']
165  variables:
166    NAME: debian-powerpc-cross
167
168ppc64-debian-cross-container:
169  <<: *container_job_definition
170  stage: containers-layer2
171  needs: ['amd64-debian10-container']
172  variables:
173    NAME: debian-ppc64-cross
174
175ppc64el-debian-cross-container:
176  <<: *container_job_definition
177  stage: containers-layer2
178  needs: ['amd64-debian10-container']
179  variables:
180    NAME: debian-ppc64el-cross
181
182riscv64-debian-cross-container:
183  <<: *container_job_definition
184  stage: containers-layer2
185  needs: ['amd64-debian10-container']
186  variables:
187    NAME: debian-riscv64-cross
188
189s390x-debian-cross-container:
190  <<: *container_job_definition
191  stage: containers-layer2
192  needs: ['amd64-debian10-container']
193  variables:
194    NAME: debian-s390x-cross
195
196sh4-debian-cross-container:
197  <<: *container_job_definition
198  stage: containers-layer2
199  needs: ['amd64-debian10-container']
200  variables:
201    NAME: debian-sh4-cross
202
203sparc64-debian-cross-container:
204  <<: *container_job_definition
205  stage: containers-layer2
206  needs: ['amd64-debian10-container']
207  variables:
208    NAME: debian-sparc64-cross
209
210tricore-debian-cross-container:
211  <<: *container_job_definition
212  stage: containers-layer2
213  needs: ['amd64-debian9-container']
214  variables:
215    NAME: debian-tricore-cross
216
217win32-debian-cross-container:
218  <<: *container_job_definition
219  stage: containers-layer3
220  needs: ['amd64-debian9-mxe-container']
221  variables:
222    NAME: debian-win32-cross
223
224win64-debian-cross-container:
225  <<: *container_job_definition
226  stage: containers-layer3
227  needs: ['amd64-debian9-mxe-container']
228  variables:
229    NAME: debian-win64-cross
230
231xtensa-debian-cross-container:
232  <<: *container_job_definition
233  variables:
234    NAME: debian-xtensa-cross
235
236cris-fedora-cross-container:
237  <<: *container_job_definition
238  variables:
239    NAME: fedora-cris-cross
240
241amd64-fedora-container:
242  <<: *container_job_definition
243  variables:
244    NAME: fedora
245
246i386-fedora-cross-container:
247  <<: *container_job_definition
248  variables:
249    NAME: fedora-i386-cross
250
251amd64-ubuntu1804-container:
252  <<: *container_job_definition
253  variables:
254    NAME: ubuntu1804
255
256amd64-ubuntu2004-container:
257  <<: *container_job_definition
258  variables:
259    NAME: ubuntu2004
260
261amd64-ubuntu-container:
262  <<: *container_job_definition
263  variables:
264    NAME: ubuntu
265