2 # ============LICENSE_START=======================================================
3 # Copyright (C) 2021 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
9 # http://www.apache.org/licenses/LICENSE-2.0
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.
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
21 name: 'onap-verify-package'
23 project: 'onap-verify-package'
28 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
29 execution-mode: 'packaging'
30 container-tool: 'docker'
31 gated-projects: 'infra/stack/onap|infra/installer/oom'
36 deploy-scenario: 'onap-full-nofeature'
39 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
40 execution-mode: 'packaging'
41 container-tool: 'docker'
42 gated-projects: 'infra/stack/onap|infra/installer/oom'
47 deploy-scenario: 'onap-full-nofeature'
50 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
51 execution-mode: 'packaging'
52 container-tool: 'docker'
53 gated-projects: 'infra/stack/onap|infra/installer/oom'
58 deploy-scenario: 'onap-full-nofeature'
61 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
62 execution-mode: 'packaging'
63 container-tool: 'docker'
64 gated-projects: 'infra/stack/onap|infra/installer/oom'
69 deploy-scenario: 'onap-full-nofeature'
73 dependency-jobs: 'onap-verify-tox-{stream}'
74 dependency-job-var: 'TRIGGER_onap_verify_tox_{stream}_BUILD_RESULT'
77 - 'onap-verify-package-{distro}-{stream}'
78 - 'onap-verify-packaging-{distro}-{stream}'
79 - 'onap-verify-test-packaging-{distro}-{stream}'
82 name: 'onap-verify-package-{distro}-{stream}'
84 project-type: multijob
86 disabled: '{obj:disabled}'
93 default: '{deploy-scenario}'
94 description: 'Scenario to test change with.'
97 default: '{container-tool}'
98 description: 'Command to use when pulling images. Options docker or podman'
102 description: 'Distribution to use for configuring target nodes (networking etc.)'
106 description: 'Verbosity setting for the engine - true or false - default is false'
110 description: 'CI loop type'
113 default: 'engine-package-{distro}-fra'
114 description: 'Slave label to schedule this job on.'
115 - project-parameters:
116 project: $GERRIT_PROJECT
118 description: 'The project and branch which the change is proposed for'
119 - nordix-gerrit-parameters
123 # NOTE (fdegir): throttle categories are controlled in jenkins global configuration
130 - engine-verify-package
134 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
135 branch: $GERRIT_BRANCH
136 refspec: $GERRIT_REFSPEC
142 server-name: 'Nordix Gerrit'
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'
154 - project-compare-type: 'REG_EXP'
155 project-pattern: '{gated-projects}'
157 - branch-compare-type: 'ANT'
158 branch-pattern: '**/{branch}'
159 disable-strict-forbidden-file-verification: 'true'
160 forbidden-file-paths:
162 pattern: 'docs/**|releasenotes/**'
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 dependency-jobs: '{dependency-jobs}'
177 - credentials-binding:
178 - username-password-separated:
179 credential-id: 'nordix-cicd-arm-credentials'
180 username: NORDIX_ARM_USERNAME
181 password: NORDIX_ARM_TOKEN
188 def build = this.getProperty('binding').getVariable('build')
189 def listener = this.getProperty('binding').getVariable('listener')
190 if (build.getEnvironment(listener).{dependency-job-var} != "SUCCESS") {{
191 println "WARN : Aborting build since dependent job did not succeed!"
192 throw new InterruptedException()
196 sudo chown -R $USER:$USER $WORKSPACE || exit 1
199 - 'generate-change-metadata-macro'
201 properties-file: "$WORKSPACE/change.properties"
202 - 'generate-ssh-keypair-macro'
203 - 'wait-pkg-mgr-macro'
205 name: ONAP Framework Packaging
206 condition: SUCCESSFUL
207 execution-type: SEQUENTIALLY
209 - name: 'onap-verify-packaging-{distro}-{stream}'
210 current-parameters: true
212 node-parameters: true
213 property-file: "$WORKSPACE/change.properties"
214 kill-phase-on: FAILURE
217 name: Test Framework Packaging
218 condition: SUCCESSFUL
219 execution-type: SEQUENTIALLY
221 - name: 'onap-verify-test-packaging-{distro}-{stream}'
222 current-parameters: true
224 node-parameters: true
225 property-file: "$WORKSPACE/change.properties"
226 kill-phase-on: FAILURE
230 name: 'onap-verify-packaging-{distro}-{stream}'
232 disabled: '{obj:disabled}'
240 description: 'Execution mode to run engine'
248 - credentials-binding:
249 - username-password-separated:
250 credential-id: 'nordix-cicd-arm-credentials'
251 username: NORDIX_ARM_USERNAME
252 password: NORDIX_ARM_TOKEN
254 - fix-workspace-permissions
258 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
259 branch: $GERRIT_BRANCH
260 refspec: $GERRIT_REFSPEC
266 - 'upload-artifact-macro'
269 name: 'onap-verify-test-packaging-{distro}-{stream}'
271 disabled: '{obj:disabled}'
279 description: 'Execution mode to run engine'
287 - credentials-binding:
288 - username-password-separated:
289 credential-id: 'nordix-cicd-arm-credentials'
290 username: NORDIX_ARM_USERNAME
291 password: NORDIX_ARM_TOKEN
293 - fix-workspace-permissions
296 - 'test-package-macro'
297 - 'xtesting-upload-artifact-macro'