xref: /openbmc/qemu/.gitlab-ci.d/containers.yml (revision 740b1759)
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
51alpha-debian-cross-container:
52  <<: *container_job_definition
53  stage: containers-layer2
54  needs: ['amd64-debian10-container']
55  variables:
56    NAME: debian-alpha-cross
57
58amd64-debian-cross-container:
59  <<: *container_job_definition
60  stage: containers-layer2
61  needs: ['amd64-debian10-container']
62  variables:
63    NAME: debian-amd64-cross
64
65amd64-debian-user-cross-container:
66  <<: *container_job_definition
67  stage: containers-layer2
68  needs: ['amd64-debian10-container']
69  variables:
70    NAME: debian-all-test-cross
71
72amd64-debian-container:
73  <<: *container_job_definition
74  stage: containers-layer2
75  needs: ['amd64-debian10-container']
76  variables:
77    NAME: debian-amd64
78
79arm64-debian-cross-container:
80  <<: *container_job_definition
81  stage: containers-layer2
82  needs: ['amd64-debian10-container']
83  variables:
84    NAME: debian-arm64-cross
85
86arm64-test-debian-cross-container:
87  <<: *container_job_definition
88  stage: containers-layer2
89  needs: ['amd64-debian11-container']
90  variables:
91    NAME: debian-arm64-test-cross
92
93armel-debian-cross-container:
94  <<: *container_job_definition
95  stage: containers-layer2
96  needs: ['amd64-debian10-container']
97  variables:
98    NAME: debian-armel-cross
99
100armhf-debian-cross-container:
101  <<: *container_job_definition
102  stage: containers-layer2
103  needs: ['amd64-debian10-container']
104  variables:
105    NAME: debian-armhf-cross
106
107hppa-debian-cross-container:
108  <<: *container_job_definition
109  stage: containers-layer2
110  needs: ['amd64-debian10-container']
111  variables:
112    NAME: debian-hppa-cross
113
114m68k-debian-cross-container:
115  <<: *container_job_definition
116  stage: containers-layer2
117  needs: ['amd64-debian10-container']
118  variables:
119    NAME: debian-m68k-cross
120
121mips64-debian-cross-container:
122  <<: *container_job_definition
123  stage: containers-layer2
124  needs: ['amd64-debian10-container']
125  variables:
126    NAME: debian-mips64-cross
127
128mips64el-debian-cross-container:
129  <<: *container_job_definition
130  stage: containers-layer2
131  needs: ['amd64-debian10-container']
132  variables:
133    NAME: debian-mips64el-cross
134
135mips-debian-cross-container:
136  <<: *container_job_definition
137  stage: containers-layer2
138  needs: ['amd64-debian10-container']
139  variables:
140    NAME: debian-mips-cross
141
142mipsel-debian-cross-container:
143  <<: *container_job_definition
144  stage: containers-layer2
145  needs: ['amd64-debian10-container']
146  variables:
147    NAME: debian-mipsel-cross
148
149powerpc-debian-cross-container:
150  <<: *container_job_definition
151  stage: containers-layer2
152  needs: ['amd64-debian10-container']
153  variables:
154    NAME: debian-powerpc-cross
155
156ppc64-debian-cross-container:
157  <<: *container_job_definition
158  stage: containers-layer2
159  needs: ['amd64-debian10-container']
160  variables:
161    NAME: debian-ppc64-cross
162
163ppc64el-debian-cross-container:
164  <<: *container_job_definition
165  stage: containers-layer2
166  needs: ['amd64-debian10-container']
167  variables:
168    NAME: debian-ppc64el-cross
169
170riscv64-debian-cross-container:
171  <<: *container_job_definition
172  stage: containers-layer2
173  needs: ['amd64-debian10-container']
174  variables:
175    NAME: debian-riscv64-cross
176
177s390x-debian-cross-container:
178  <<: *container_job_definition
179  stage: containers-layer2
180  needs: ['amd64-debian10-container']
181  variables:
182    NAME: debian-s390x-cross
183
184sh4-debian-cross-container:
185  <<: *container_job_definition
186  stage: containers-layer2
187  needs: ['amd64-debian10-container']
188  variables:
189    NAME: debian-sh4-cross
190
191sparc64-debian-cross-container:
192  <<: *container_job_definition
193  stage: containers-layer2
194  needs: ['amd64-debian10-container']
195  variables:
196    NAME: debian-sparc64-cross
197
198tricore-debian-cross-container:
199  <<: *container_job_definition
200  stage: containers-layer2
201  needs: ['amd64-debian10-container']
202  variables:
203    NAME: debian-tricore-cross
204
205xtensa-debian-cross-container:
206  <<: *container_job_definition
207  variables:
208    NAME: debian-xtensa-cross
209
210cris-fedora-cross-container:
211  <<: *container_job_definition
212  variables:
213    NAME: fedora-cris-cross
214
215amd64-fedora-container:
216  <<: *container_job_definition
217  variables:
218    NAME: fedora
219
220i386-fedora-cross-container:
221  <<: *container_job_definition
222  variables:
223    NAME: fedora-i386-cross
224
225win32-fedora-cross-container:
226  <<: *container_job_definition
227  variables:
228    NAME: fedora-win32-cross
229
230win64-fedora-cross-container:
231  <<: *container_job_definition
232  variables:
233    NAME: fedora-win64-cross
234
235amd64-ubuntu1804-container:
236  <<: *container_job_definition
237  variables:
238    NAME: ubuntu1804
239
240amd64-ubuntu2004-container:
241  <<: *container_job_definition
242  variables:
243    NAME: ubuntu2004
244
245amd64-ubuntu-container:
246  <<: *container_job_definition
247  variables:
248    NAME: ubuntu
249