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 - ssh-agent-credentials:
179 - 'nordixinfra-nordix-gerrit-ssh'
180 - credentials-binding:
181 - username-password-separated:
182 credential-id: 'nordix-cicd-arm-credentials'
183 username: NORDIX_ARM_USERNAME
184 password: NORDIX_ARM_TOKEN
191 def build = this.getProperty('binding').getVariable('build')
192 def listener = this.getProperty('binding').getVariable('listener')
193 if (build.getEnvironment(listener).{dependency-job-var} != "SUCCESS") {{
194 println "WARN : Aborting build since dependent job did not succeed!"
195 throw new InterruptedException()
199 sudo chown -R $USER:$USER $WORKSPACE || exit 1
202 - 'generate-change-metadata-macro'
204 properties-file: "$WORKSPACE/change.properties"
205 - 'generate-ssh-keypair-macro'
206 - 'wait-pkg-mgr-macro'
208 name: ONAP Framework Packaging
209 condition: SUCCESSFUL
210 execution-type: SEQUENTIALLY
212 - name: 'onap-verify-packaging-{distro}-{stream}'
213 current-parameters: true
215 node-parameters: true
216 property-file: "$WORKSPACE/change.properties"
217 kill-phase-on: FAILURE
220 name: Test Framework Packaging
221 condition: SUCCESSFUL
222 execution-type: SEQUENTIALLY
224 - name: 'onap-verify-test-packaging-{distro}-{stream}'
225 current-parameters: true
227 node-parameters: true
228 property-file: "$WORKSPACE/change.properties"
229 kill-phase-on: FAILURE
233 name: 'onap-verify-packaging-{distro}-{stream}'
235 disabled: '{obj:disabled}'
243 description: 'Execution mode to run engine'
251 - credentials-binding:
252 - username-password-separated:
253 credential-id: 'nordix-cicd-arm-credentials'
254 username: NORDIX_ARM_USERNAME
255 password: NORDIX_ARM_TOKEN
257 - fix-workspace-permissions
261 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
262 branch: $GERRIT_BRANCH
263 refspec: $GERRIT_REFSPEC
269 - 'upload-artifact-macro'
272 name: 'onap-verify-test-packaging-{distro}-{stream}'
274 disabled: '{obj:disabled}'
282 description: 'Execution mode to run engine'
290 - credentials-binding:
291 - username-password-separated:
292 credential-id: 'nordix-cicd-arm-credentials'
293 username: NORDIX_ARM_USERNAME
294 password: NORDIX_ARM_TOKEN
296 - fix-workspace-permissions
299 - 'test-package-macro'
300 - 'xtesting-upload-artifact-macro'