engine: Lay down basic structure for verify jobs
[infra/cicd.git] / jjb / engine / engine-verify-deployment-parent-jobs.yaml
1 ---
2 # ============LICENSE_START=======================================================
3 #  Copyright (C) 2019 Nordix Foundation.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #      http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
19
20 - project:
21     name: 'engine-deployment'
22
23     project: 'engine-deployment'
24
25     stream:
26       - 'master':
27           branch: '{stream}'
28           gated-projects: 'infra\/engine'
29
30     environment-type:
31       - online:
32           disabled: false
33           execution-mode: online-deployment
34           successful: true
35           failed: true
36           unstable: true
37           notbuilt: true
38       - offline:
39           disabled: false
40           execution-mode: offline-deployment
41           successful: true
42           failed: true
43           unstable: true
44           notbuilt: true
45
46     distro:
47       - ubuntu1804
48
49     cloud:
50       - city:
51           openrc-credentials-file: 'est-jenkins-openrcfile-city-karlskrona-onap'
52
53     jobs:
54       - 'engine-verify-{environment-type}-{distro}-{cloud}-{stream}'
55       - 'engine-verify-packaging-{distro}-{stream}'
56
57 - job-template:
58     name: 'engine-verify-{environment-type}-{distro}-{cloud}-{stream}'
59
60     project-type: multijob
61
62     disabled: '{obj:disabled}'
63
64     concurrent: true
65
66     parameters:
67       - project-parameters:
68           project: $GERRIT_PROJECT
69           branch: '{branch}'
70           description: 'The project and branch which the change is proposed for'
71       - string:
72           name: EXECUTION_MODE
73           default: '{execution-mode}'
74           description: 'Engine execution mode - online-deployment or offline-deployment - default is online-deployment'
75       - string:
76           name: VERBOSITY
77           default: 'false'
78           description: 'Verbosity setting for the engine - true or false - default is false'
79       - nordix-gerrit-parameters
80       - label:
81           name: SLAVE_LABEL
82           default: 'engine-master-{environment-type}-{distro}'
83           description: 'Slave label to schedule this job on.'
84       - string:
85           name: DISTRO
86           default: '{distro}'
87           description: 'Distribution to use for configuring target nodes (networking etc.)'
88
89     properties:
90       - logrotate
91       - build-blocker:
92           use-build-blocker: true
93           blocking-jobs:
94             - 'engine-verify-packaging-ubuntu1804.*'
95             - 'engine-verify-online-ubuntu1804.*'
96             - 'engine-verify-offline-ubuntu1804.*'
97           block-level: 'NODE'
98       - throttle:
99           max-per-node: 1
100           max-total: 3
101           option: project
102
103     wrappers:
104       - build-timeout:
105           timeout: 180
106       - credentials-binding:
107           - username-password-separated:
108               credential-id: 'nordix-cicd-arm-credentials'
109               username: NORDIX_ARM_USERNAME
110               password: NORDIX_ARM_TOKEN
111       - mask-passwords
112       - fix-workspace-permissions
113       - openstack:
114           single-use: True
115
116     scm:
117       - git-scm-gerrit:
118           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
119           branch: '{branch}'
120           refspec: $GERRIT_REFSPEC
121           wipe_workspace: true
122           clean_before: false
123
124     triggers:
125       - gerrit:
126           server-name: 'Nordix Gerrit'
127           trigger-on:
128             - patchset-created-event:
129                 exclude-drafts: 'false'
130                 exclude-trivial-rebase: 'false'
131                 exclude-no-code-change: 'false'
132             - draft-published-event
133             - comment-added-contains-event:
134                 comment-contains-value: 'recheck'
135             - comment-added-contains-event:
136                 comment-contains-value: 'reverify'
137           projects:
138             - project-compare-type: 'REG_EXP'
139               project-pattern: '{gated-projects}'
140               branches:
141                 - branch-compare-type: 'ANT'
142                   branch-pattern: '**/{branch}'
143               disable-strict-forbidden-file-verification: 'true'
144               forbidden-file-paths:
145                 - compare-type: ANT
146                   pattern: 'docs/**'
147           skip-vote:
148             successful: '{obj:successful}'
149             failed: '{obj:failed}'
150             unstable: '{obj:unstable}'
151             notbuilt: '{obj:notbuilt}'
152           custom-url: '* $JOB_NAME $BUILD_URL'
153
154     builders:
155       - multijob:
156           name: Packaging
157           condition: SUCCESSFUL
158           execution-type: PARALLEL
159           projects:
160             - name: 'engine-verify-packaging-{distro}-{stream}'
161               current-parameters: true
162               node-parameters: true
163               kill-phase-on: FAILURE
164               abort-all-job: true
165       - multijob:
166           name: Deployment and Testing
167           condition: SUCCESSFUL
168           execution-type: PARALLEL
169           projects:
170             - name: 'engine-verify-online-deploy-test-{distro}-city-virtual-master'
171               current-parameters: true
172               node-parameters: false
173               kill-phase-on: FAILURE
174               abort-all-job: true
175             - name: 'engine-verify-offline-deploy-test-{distro}-city-cloud-master'
176               current-parameters: true
177               node-parameters: false
178               kill-phase-on: FAILURE
179               abort-all-job: true
180
181 - job-template:
182     name: 'engine-verify-packaging-{distro}-{stream}'
183
184     disabled: '{obj:disabled}'
185
186     concurrent: true
187
188     properties:
189       - logrotate
190       - build-blocker:
191           use-build-blocker: true
192           blocking-jobs:
193             - 'engine-verify-packaging-ubuntu1804.*'
194             - 'engine-verify-online-ubuntu1804.*'
195             - 'engine-verify-offline-ubuntu1804.*'
196           block-level: 'NODE'
197       - throttle:
198           max-per-node: 1
199           max-total: 3
200           option: project
201
202     wrappers:
203       - build-timeout:
204           timeout: 180
205       - credentials-binding:
206           - username-password-separated:
207               credential-id: 'nordix-cicd-arm-credentials'
208               username: NORDIX_ARM_USERNAME
209               password: NORDIX_ARM_TOKEN
210       - mask-passwords
211       - fix-workspace-permissions
212       - openstack:
213           single-use: True
214
215     scm:
216       - git-scm-gerrit:
217           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
218           branch: '{branch}'
219           refspec: $GERRIT_REFSPEC
220           wipe_workspace: true
221           clean_before: false
222
223     builders:
224       - shell: |
225           env