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
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'
29 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
30 execution-mode: 'packaging'
31 container-tool: 'docker'
32 gated-projects: 'infra/stack/onap|infra/installer/oom'
37 deploy-scenario: 'onap-full-nofeature'
40 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
41 execution-mode: 'packaging'
42 container-tool: 'docker'
43 gated-projects: 'infra/stack/onap|infra/installer/oom'
48 deploy-scenario: 'onap-full-nofeature'
51 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
52 execution-mode: 'packaging'
53 container-tool: 'docker'
54 gated-projects: 'infra/stack/onap|infra/installer/oom'
59 deploy-scenario: 'onap-full-nofeature'
64 dependency-jobs: 'onap-verify-tox-{stream}'
65 dependency-job-var: 'TRIGGER_onap_verify_tox_{stream}_BUILD_RESULT'
68 - 'onap-verify-package-{distro}-{stream}'
71 name: 'onap-verify-package-{distro}-{stream}'
73 disabled: '{obj:disabled}'
80 default: '{deploy-scenario}'
81 description: 'Scenario to test change with.'
84 default: '{execution-mode}'
85 description: 'Engine execution mode - packaging'
88 default: '{container-tool}'
89 description: 'Command to use when pulling images. Options docker or podman'
93 description: 'Distribution to use for configuring target nodes (networking etc.)'
97 description: 'Verbosity setting for the engine - true or false - default is false'
101 description: 'CI loop type'
104 default: 'engine-package-{distro}-fra'
105 description: 'Slave label to schedule this job on.'
106 - project-parameters:
107 project: $GERRIT_PROJECT
109 description: 'The project and branch which the change is proposed for'
110 - nordix-gerrit-parameters
114 # NOTE (fdegir): throttle categories are controlled in jenkins global configuration
121 - engine-verify-package
125 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
126 branch: $GERRIT_BRANCH
127 refspec: $GERRIT_REFSPEC
133 server-name: 'Nordix Gerrit'
135 - patchset-created-event:
136 exclude-drafts: 'false'
137 exclude-trivial-rebase: 'false'
138 exclude-no-code-change: 'false'
139 - draft-published-event
140 - comment-added-contains-event:
141 comment-contains-value: 'recheck'
142 - comment-added-contains-event:
143 comment-contains-value: 'reverify'
145 - project-compare-type: 'REG_EXP'
146 project-pattern: '{gated-projects}'
148 - branch-compare-type: 'ANT'
149 branch-pattern: '**/{branch}'
150 disable-strict-forbidden-file-verification: 'true'
151 forbidden-file-paths:
153 pattern: 'docs/**|releasenotes/**'
155 successful: '{obj:successful}'
156 failed: '{obj:failed}'
157 unstable: '{obj:unstable}'
158 notbuilt: '{obj:notbuilt}'
159 custom-url: '* $JOB_NAME $BUILD_URL'
160 readable-message: 'true'
161 dependency-jobs: '{dependency-jobs}'
168 - credentials-binding:
169 - username-password-separated:
170 credential-id: 'nordix-cicd-arm-credentials'
171 username: NORDIX_ARM_USERNAME
172 password: NORDIX_ARM_TOKEN
179 def build = this.getProperty('binding').getVariable('build')
180 def listener = this.getProperty('binding').getVariable('listener')
181 if (build.getEnvironment(listener).{dependency-job-var} != "SUCCESS") {{
182 println "WARN : Aborting build since dependent job did not succeed!"
183 throw new InterruptedException()
187 sudo chown -R $USER:$USER $WORKSPACE || exit 1
191 - 'generate-change-metadata-macro'
193 properties-file: "$WORKSPACE/change.properties"
194 - 'generate-ssh-keypair-macro'
195 - 'wait-pkg-mgr-macro'
197 - 'upload-artifact-macro'