engine: Move PDF and IDF parameters to deployment jobs
[infra/cicd.git] / jjb / engine / engine-verify-jobs / 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: false
35           failed: false
36           unstable: false
37           notbuilt: false
38       - offline:
39           disabled: false
40           execution-mode: offline-deployment
41           successful: false
42           failed: false
43           unstable: false
44           notbuilt: false
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       - string:
68           name: EXECUTION_MODE
69           default: '{execution-mode}'
70           description: 'Engine execution mode - online-deployment or offline-deployment - default is online-deployment'
71       - string:
72           name: DISTRO
73           default: '{distro}'
74           description: 'Distribution to use for configuring target nodes (networking etc.)'
75       - string:
76           name: INSTALLER_TYPE
77           default: 'kubespray'
78           description: 'Installer type to use'
79       - string:
80           name: DEPLOY_SCENARIO
81           default: 'k8-calico-nofeature'
82           description: 'Scenario to deploy and test'
83       - string:
84           name: VERBOSITY
85           default: 'true'
86           description: 'Verbosity setting for the engine - true or false - default is false'
87       - string:
88           name: NORDIX_ARM_PUBLIC_IP
89           default: '91.106.198.25'
90           description: 'Public IP of Nordix Artifactory. Offline deployments can not resolve domain name'
91       - string:
92           name: NORDIX_ARM_HTTPS_URL
93           default: 'https://artifactory.nordix.org/artifactory'
94           description: 'URL to Nordix Artifactory'
95       - string:
96           name: NORDIX_ARM_REPO
97           default: 'nordix-kubernetes'
98           description: 'Name of the repository to upload and download artifact to/from. Depends on the stack'
99       - string:
100           name: NORDIX_ARTIFACT_URL
101           default: "$NORDIX_ARM_HTTPS_URL/$NORDIX_ARM_REPO/installer/oss/change/$GERRIT_CHANGE_NUMBER/k8s-installer-ubuntu1804.bsx"
102           description: 'Name of the repository to upload and download artifact to/from. Depends on the stack'
103       - string:
104           name: CI_LOOP
105           default: 'verify'
106           description: 'CI loop type'
107       - label:
108           name: SLAVE_LABEL
109           default: 'engine-master-{environment-type}-{distro}'
110           description: 'Slave label to schedule this job on.'
111       - project-parameters:
112           project: $GERRIT_PROJECT
113           branch: '{branch}'
114           description: 'The project and branch which the change is proposed for'
115       - nordix-gerrit-parameters
116
117     properties:
118       - logrotate
119       - throttle:
120           max-per-node: 1
121           max-total: 3
122           option: project
123
124     wrappers:
125       - build-timeout:
126           timeout: 180
127       - mask-passwords
128       - fix-workspace-permissions
129       - openstack:
130           single-use: True
131
132     scm:
133       - git-scm-gerrit:
134           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
135           branch: '{branch}'
136           refspec: $GERRIT_REFSPEC
137           wipe_workspace: true
138           clean_before: false
139
140     triggers:
141       - gerrit:
142           server-name: 'Nordix Gerrit'
143           trigger-on:
144             - patchset-created-event:
145                 exclude-drafts: 'false'
146                 exclude-trivial-rebase: 'false'
147                 exclude-no-code-change: 'false'
148             - draft-published-event
149             - comment-added-contains-event:
150                 comment-contains-value: 'recheck'
151             - comment-added-contains-event:
152                 comment-contains-value: 'reverify'
153           projects:
154             - project-compare-type: 'REG_EXP'
155               project-pattern: '{gated-projects}'
156               branches:
157                 - branch-compare-type: 'ANT'
158                   branch-pattern: '**/{branch}'
159               disable-strict-forbidden-file-verification: 'true'
160               forbidden-file-paths:
161                 - compare-type: ANT
162                   pattern: 'docs/**'
163           skip-vote:
164             successful: '{obj:successful}'
165             failed: '{obj:failed}'
166             unstable: '{obj:unstable}'
167             notbuilt: '{obj:notbuilt}'
168           custom-url: '* $JOB_NAME $BUILD_URL'
169           readable-message: 'true'
170
171     builders:
172       - multijob:
173           name: packaging
174           condition: SUCCESSFUL
175           execution-type: PARALLEL
176           projects:
177             - name: 'engine-verify-packaging-{distro}-{stream}'
178               current-parameters: true
179               node-parameters: true
180               kill-phase-on: FAILURE
181               abort-all-job: true
182       - multijob:
183           name: "{environment-type} deployment and testing"
184           condition: SUCCESSFUL
185           execution-type: PARALLEL
186           projects:
187             - name: 'engine-verify-{environment-type}-deploy-test-{distro}-city-virtual-master'
188               current-parameters: false
189               node-parameters: false
190               predefined-parameters: |
191                 GIT_BASE_SSH=$GIT_BASE_SSH
192                 GERRIT_PROJECT=$GERRIT_PROJECT
193                 GERRIT_BRANCH=$GERRIT_BRANCH
194                 GERRIT_REFSPEC=$GERRIT_REFSPEC
195                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
196                 GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID
197                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
198                 PROJECT=$GERRIT_PROJECT
199                 BRANCH=$BRANCH
200                 NORDIX_ARM_PUBLIC_IP=$NORDIX_ARM_PUBLIC_IP
201                 NORDIX_ARTIFACT_URL=$NORDIX_ARTIFACT_URL
202                 EXECUTION_MODE=$EXECUTION_MODE
203                 VERBOSITY=$VERBOSITY
204                 DISTRO=$DISTRO
205                 INSTALLER_TYPE=$INSTALLER_TYPE
206                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
207                 PDF=$PDF
208                 IDF=$IDF
209               kill-phase-on: FAILURE
210               abort-all-job: false
211             - name: 'engine-verify-{environment-type}-deploy-test-{distro}-city-cloud-master'
212               current-parameters: false
213               node-parameters: false
214               predefined-parameters: |
215                 GIT_BASE_SSH=$GIT_BASE_SSH
216                 GERRIT_PROJECT=$GERRIT_PROJECT
217                 GERRIT_BRANCH=$GERRIT_BRANCH
218                 GERRIT_REFSPEC=$GERRIT_REFSPEC
219                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
220                 GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID
221                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
222                 PROJECT=$GERRIT_PROJECT
223                 BRANCH=$BRANCH
224                 NORDIX_ARM_PUBLIC_IP=$NORDIX_ARM_PUBLIC_IP
225                 NORDIX_ARTIFACT_URL=$NORDIX_ARTIFACT_URL
226                 EXECUTION_MODE=$EXECUTION_MODE
227                 VERBOSITY=$VERBOSITY
228                 DISTRO=$DISTRO
229                 INSTALLER_TYPE=$INSTALLER_TYPE
230                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
231                 PDF=$PDF
232                 IDF=$IDF
233               kill-phase-on: FAILURE
234               abort-all-job: false
235
236 - job-template:
237     name: 'engine-verify-packaging-{distro}-{stream}'
238
239     disabled: '{obj:disabled}'
240
241     concurrent: true
242
243     properties:
244       - logrotate
245       - throttle:
246           max-per-node: 1
247           max-total: 3
248           option: project
249
250     wrappers:
251       - build-timeout:
252           timeout: 70
253       - credentials-binding:
254           - username-password-separated:
255               credential-id: 'nordix-cicd-arm-credentials'
256               username: NORDIX_ARM_USERNAME
257               password: NORDIX_ARM_TOKEN
258       - mask-passwords
259       - fix-workspace-permissions
260
261     scm:
262       - git-scm-gerrit:
263           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
264           branch: '{branch}'
265           refspec: $GERRIT_REFSPEC
266           wipe_workspace: true
267           clean_before: false
268
269     builders:
270       - 'engine-wait-pkg-mgr-macro'
271       - 'engine-generate-ssh-keypair-macro'
272       - 'engine-packaging-macro'
273       - 'engine-upload-artifact-macro'