Temporarily stop building arm64 containers
[releng.git] / jjb / functest / functest-docker.yaml
1 ---
2 ##############################################
3 # job configuration for docker build and push
4 ##############################################
5 - project:
6
7     name: functest-docker
8
9     project: functest
10
11     stream:
12       - master:
13           branch: '{stream}'
14           disabled: false
15       - hunter:
16           branch: 'stable/{stream}'
17           disabled: false
18       - gambia:
19           branch: 'stable/{stream}'
20           disabled: false
21
22     arch_tag:
23       - 'amd64':
24           slave_label: 'opnfv-build-ubuntu'
25       - 'arm64':
26           slave_label: 'opnfv-build-ubuntu-arm'
27
28     # yamllint disable rule:key-duplicates
29     image:
30       - 'core'
31       - 'tempest'
32       - 'healthcheck'
33       - 'features'
34       - 'components'
35       - 'smoke'
36       - 'benchmarking'
37       - 'vnf'
38
39     exclude:
40       - stream: 'master'
41         image: 'components'
42       - stream: 'hunter'
43         image: 'components'
44
45     # settings for jobs run in multijob phases
46     build-job-settings: &build-job-settings
47       current-parameters: false
48       git-revision: true
49       node-parameters: false
50       predefined-parameters: |
51         PUSH_IMAGE=$PUSH_IMAGE
52         COMMIT_ID=$COMMIT_ID
53         GERRIT_REFNAME=$GERRIT_REFNAME
54         DOCKERFILE=$DOCKERFILE
55       kill-phase-on: FAILURE
56       abort-all-jobs: false
57
58     manifest-job-settings: &manifest-job-settings
59       current-parameters: false
60       git-revision: true
61       node-parameters: false
62       predefined-parameters:
63         GERRIT_REFNAME=$GERRIT_REFNAME
64       kill-phase-on: FAILURE
65       abort-all-jobs: false
66
67     # yamllint enable rule:key-duplicates
68     jobs:
69       - "functest-docker-{stream}"
70       - "functest-{image}-docker-build-{arch_tag}-{stream}"
71       - "functest-{image}-docker-manifest-{stream}"
72
73 ########################
74 # job templates
75 ########################
76 - job-template:
77     name: 'functest-docker-{stream}'
78
79     project-type: multijob
80
81     disabled: '{obj:disabled}'
82
83     parameters:
84       - functest-job-parameters:
85           project: '{project}'
86           branch: '{branch}'
87           slave_label: 'opnfv-build-ubuntu'
88           arch_tag: 'amd64'
89
90     properties:
91       - throttle:
92           max-per-node: 1
93           option: 'project'
94
95     scm:
96       - git-scm
97
98     triggers:
99       - pollscm:
100           cron: "*/30 * * * *"
101       - gerrit-trigger-tag-created:
102           project: '{project}'
103
104     builders:
105       - multijob:
106           name: 'build functest-core images'
107           execution-type: PARALLEL
108           projects:
109             - name: 'functest-core-docker-build-amd64-{stream}'
110               <<: *build-job-settings
111       - multijob:
112           name: 'publish functest-core manifests'
113           execution-type: PARALLEL
114           projects:
115             - name: 'functest-core-docker-manifest-{stream}'
116               <<: *manifest-job-settings
117       - multijob:
118           name: 'build functest-tempest images'
119           execution-type: PARALLEL
120           projects:
121             - name: 'functest-tempest-docker-build-amd64-{stream}'
122               <<: *build-job-settings
123       - multijob:
124           name: 'publish functest-tempest manifests'
125           execution-type: PARALLEL
126           projects:
127             - name: 'functest-tempest-docker-manifest-{stream}'
128               <<: *manifest-job-settings
129       - multijob:
130           name: 'build all functest images'
131           condition: SUCCESSFUL
132           execution-type: PARALLEL
133           projects:
134             - name: 'functest-healthcheck-docker-build-amd64-{stream}'
135               <<: *build-job-settings
136             - name: 'functest-features-docker-build-amd64-{stream}'
137               <<: *build-job-settings
138             - name: 'functest-components-docker-build-amd64-{stream}'
139               <<: *build-job-settings
140             - name: 'functest-smoke-docker-build-amd64-{stream}'
141               <<: *build-job-settings
142             - name: 'functest-benchmarking-docker-build-amd64-{stream}'
143               <<: *build-job-settings
144             - name: 'functest-vnf-docker-build-amd64-{stream}'
145               <<: *build-job-settings
146       - multijob:
147           name: 'publish all manifests'
148           condition: SUCCESSFUL
149           execution-type: PARALLEL
150           projects:
151             - name: 'functest-healthcheck-docker-manifest-{stream}'
152               <<: *manifest-job-settings
153             - name: 'functest-features-docker-manifest-{stream}'
154               <<: *manifest-job-settings
155             - name: 'functest-components-docker-manifest-{stream}'
156               <<: *manifest-job-settings
157             - name: 'functest-smoke-docker-manifest-{stream}'
158               <<: *manifest-job-settings
159             - name: 'functest-benchmarking-docker-manifest-{stream}'
160               <<: *manifest-job-settings
161             - name: 'functest-vnf-docker-manifest-{stream}'
162               <<: *manifest-job-settings
163
164     publishers:
165       - 'functest-amd64-recipients'
166       - 'functest-arm64-recipients'
167
168 - job-template:
169     name: 'functest-{image}-docker-build-{arch_tag}-{stream}'
170     disabled: '{obj:disabled}'
171     parameters:
172       - functest-job-parameters:
173           project: '{project}'
174           branch: '{branch}'
175           slave_label: '{slave_label}'
176           arch_tag: '{arch_tag}'
177     scm:
178       - git-scm
179     builders:
180       - shell: |
181           #!/bin/bash -ex
182           case "{arch_tag}" in
183           "arm64")
184               sudo amd64_dirs= arm64_dirs=docker/{image} bash ./build.sh ;;
185           *)
186               sudo amd64_dirs=docker/{image} arm64_dirs= bash ./build.sh ;;
187           esac
188           exit $?
189
190 - job-template:
191     name: 'functest-{image}-docker-manifest-{stream}'
192
193     parameters:
194       - project-parameter:
195           project: '{project}'
196           branch: '{branch}'
197       - label:
198           name: SLAVE_LABEL
199           default: 'opnfv-build-ubuntu'
200           description: 'Slave label on Jenkins'
201           all-nodes: false
202           node-eligibility: 'ignore-offline'
203       - string:
204           name: PROJECT
205           default: "{project}"
206           description: "Project name used to enable job conditions"
207       - string:
208           name: GIT_BASE
209           default: https://gerrit.opnfv.org/gerrit/$PROJECT
210           description: 'Git URL to use on this Jenkins Slave'
211       - string:
212           name: REPO
213           default: "opnfv"
214           description: "Repository name for functest images"
215
216
217     disabled: '{obj:disabled}'
218
219     builders:
220       - shell: |
221           #!/bin/bash -ex
222           case "{stream}" in
223           "master")
224               tag="latest" ;;
225           *)
226               tag="{stream}" ;;
227           esac
228           sudo manifest-tool push from-args \
229               --platforms linux/amd64,linux/arm64 \
230               --template $REPO/functest-{image}:ARCH-$tag \
231               --target $REPO/functest-{image}:$tag
232           exit $?
233
234 # parameter macro
235 - parameter:
236     name: functest-job-parameters
237     parameters:
238       - project-parameter:
239           project: '{project}'
240           branch: '{branch}'
241       - label:
242           name: SLAVE_LABEL
243           default: '{slave_label}'
244           description: 'Slave label on Jenkins'
245           all-nodes: false
246           node-eligibility: 'ignore-offline'
247       - string:
248           name: GIT_BASE
249           default: https://gerrit.opnfv.org/gerrit/$PROJECT
250           description: 'Git URL to use on this Jenkins Slave'
251       - string:
252           name: PUSH_IMAGE
253           default: "true"
254           description: "To enable/disable pushing the image to Dockerhub."
255       - string:
256           name: COMMIT_ID
257           default: ""
258           description: "commit id to make a snapshot docker image"
259       - string:
260           name: GERRIT_REFNAME
261           default: ""
262           description: "Docker tag to be built, e.g. refs/tags/5.0.0, refs/tags/opnfv-5.0.0, refs/tags/5.0.RC1"
263       - string:
264           name: DOCKERFILE
265           default: "Dockerfile"
266           description: "Dockerfile to use for creating the image."
267       - string:
268           name: ARCH_TAG
269           default: "{arch_tag}"
270           description: "If set, this value will be added to the docker image tag as a prefix"
271       - string:
272           name: PROJECT
273           default: "{project}"
274           description: "Project name used to enable job conditions"
275       - string:
276           name: REPO
277           default: "opnfv"
278           description: "Repository name for functest images"
279
280 # publisher macros
281 - publisher:
282     name: 'functest-arm64-recipients'
283     publishers:
284       - email:
285           recipients: >
286             cristina.pauna@enea.com
287             alexandru.avadanii@enea.com
288             delia.popescu@enea.com
289
290 - publisher:
291     name: 'functest-amd64-recipients'
292     publishers:
293       - email:
294           recipients: >
295             jalausuch@suse.com morgan.richomme@orange.com
296             cedric.ollivier@orange.com feng.xiaowei@zte.com.cn
297             juha.kosonen@nokia.com wangwulin@huawei.com
298             valentin.boucher@kontron.com