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: 'kubernetes-verify-package'
23 project: 'kubernetes-verify-package'
25 # NOTE (fdegir): dot is not an allowed character in groovy var names and also for
26 # naming openstack objects so stream is used for that purpose but branch points to
27 # actual branch name on gerrit
31 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
32 execution-mode: 'packaging'
33 gated-projects: 'infra/stack/kubernetes|infra/installer/kubespray'
38 deploy-scenario: 'k8-multus-plugins'
41 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
42 execution-mode: 'packaging'
43 gated-projects: 'infra/stack/kubernetes|infra/installer/kubespray'
48 deploy-scenario: 'k8-multus-plugins'
51 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
52 execution-mode: 'packaging'
53 gated-projects: 'infra/stack/kubernetes|infra/installer/kubespray'
58 deploy-scenario: 'k8-multus-plugins'
61 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
62 execution-mode: 'packaging'
63 gated-projects: 'infra/stack/kubernetes|infra/installer/kubespray'
68 deploy-scenario: 'k8-multus-plugins'
71 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
72 execution-mode: 'packaging'
73 gated-projects: 'infra/stack/kubernetes|infra/installer/kubespray'
78 deploy-scenario: 'k8-multus-plugins'
81 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
82 execution-mode: 'packaging'
83 gated-projects: 'infra/stack/kubernetes|infra/installer/kubespray'
88 deploy-scenario: 'k8-calico-nofeature'
91 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
92 execution-mode: 'packaging'
93 gated-projects: 'infra/stack/kubernetes|infra/installer/kubespray'
98 deploy-scenario: 'k8-calico-nofeature'
103 dependency-jobs: 'kubernetes-verify-tox-{stream}'
104 dependency-job-var: 'TRIGGER_kubernetes_verify_tox_{stream}_BUILD_RESULT'
107 - 'kubernetes-verify-package-{distro}-{stream}'
110 name: 'kubernetes-verify-package-{distro}-{stream}'
112 disabled: '{obj:disabled}'
118 name: DEPLOY_SCENARIO
119 default: '{deploy-scenario}'
120 description: 'Scenario to test change with.'
123 default: '{execution-mode}'
124 description: 'Engine execution mode - packaging'
128 description: 'Distribution to use for configuring target nodes (networking etc.)'
132 description: 'Verbosity setting for the engine - true or false - default is false'
136 description: 'CI loop type'
139 default: 'engine-package-{distro}-fra'
140 description: 'Slave label to schedule this job on.'
141 - project-parameters:
142 project: $GERRIT_PROJECT
144 description: 'The project and branch which the change is proposed for'
145 - nordix-gerrit-parameters
149 # NOTE (fdegir): throttle categories are controlled in jenkins global configuration
156 - engine-verify-package
160 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
161 branch: $GERRIT_BRANCH
162 refspec: $GERRIT_REFSPEC
168 server-name: 'Nordix Gerrit'
170 - patchset-created-event:
171 exclude-drafts: 'false'
172 exclude-trivial-rebase: 'false'
173 exclude-no-code-change: 'false'
174 - draft-published-event
175 - comment-added-contains-event:
176 comment-contains-value: 'recheck'
177 - comment-added-contains-event:
178 comment-contains-value: 'reverify'
180 - project-compare-type: 'REG_EXP'
181 project-pattern: '{gated-projects}'
183 - branch-compare-type: 'ANT'
184 branch-pattern: '**/{branch}'
185 disable-strict-forbidden-file-verification: 'true'
186 forbidden-file-paths:
188 pattern: 'docs/**|releasenotes/**'
190 successful: '{obj:successful}'
191 failed: '{obj:failed}'
192 unstable: '{obj:unstable}'
193 notbuilt: '{obj:notbuilt}'
194 custom-url: '* $JOB_NAME $BUILD_URL'
195 readable-message: 'true'
196 dependency-jobs: '{dependency-jobs}'
203 - credentials-binding:
204 - username-password-separated:
205 credential-id: 'nordix-cicd-arm-credentials'
206 username: NORDIX_ARM_USERNAME
207 password: NORDIX_ARM_TOKEN
214 def build = this.getProperty('binding').getVariable('build')
215 def listener = this.getProperty('binding').getVariable('listener')
216 if (build.getEnvironment(listener).{dependency-job-var} != "SUCCESS") {{
217 println "WARN : Aborting build since dependent job did not succeed!"
218 throw new InterruptedException()
222 sudo chown -R $USER:$USER $WORKSPACE || exit 1
223 - ssh-agent-credentials:
225 - 'nordixinfra-nordix-gerrit-ssh'
229 - 'generate-change-metadata-macro'
231 properties-file: "$WORKSPACE/change.properties"
232 - 'generate-ssh-keypair-macro'
233 - 'wait-pkg-mgr-macro'
235 - 'upload-artifact-macro'