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-calico-nofeature'
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-calico-nofeature'
83 dependency-jobs: 'kubernetes-verify-tox-{stream}'
84 dependency-job-var: 'TRIGGER_kubernetes_verify_tox_{stream}_BUILD_RESULT'
87 - 'kubernetes-verify-package-{distro}-{stream}'
90 name: 'kubernetes-verify-package-{distro}-{stream}'
92 disabled: '{obj:disabled}'
99 default: '{deploy-scenario}'
100 description: 'Scenario to test change with.'
103 default: '{execution-mode}'
104 description: 'Engine execution mode - packaging'
108 description: 'Distribution to use for configuring target nodes (networking etc.)'
112 description: 'Verbosity setting for the engine - true or false - default is false'
116 description: 'CI loop type'
119 default: 'engine-package-{distro}-fra'
120 description: 'Slave label to schedule this job on.'
121 - project-parameters:
122 project: $GERRIT_PROJECT
124 description: 'The project and branch which the change is proposed for'
125 - nordix-gerrit-parameters
129 # NOTE (fdegir): throttle categories are controlled in jenkins global configuration
136 - engine-verify-package
140 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
141 branch: $GERRIT_BRANCH
142 refspec: $GERRIT_REFSPEC
148 server-name: 'Nordix Gerrit'
150 - patchset-created-event:
151 exclude-drafts: 'false'
152 exclude-trivial-rebase: 'false'
153 exclude-no-code-change: 'false'
154 - draft-published-event
155 - comment-added-contains-event:
156 comment-contains-value: 'recheck'
157 - comment-added-contains-event:
158 comment-contains-value: 'reverify'
160 - project-compare-type: 'REG_EXP'
161 project-pattern: '{gated-projects}'
163 - branch-compare-type: 'ANT'
164 branch-pattern: '**/{branch}'
165 disable-strict-forbidden-file-verification: 'true'
166 forbidden-file-paths:
168 pattern: 'docs/**|releasenotes/**'
170 successful: '{obj:successful}'
171 failed: '{obj:failed}'
172 unstable: '{obj:unstable}'
173 notbuilt: '{obj:notbuilt}'
174 custom-url: '* $JOB_NAME $BUILD_URL'
175 readable-message: 'true'
176 dependency-jobs: '{dependency-jobs}'
183 - credentials-binding:
184 - username-password-separated:
185 credential-id: 'nordix-cicd-arm-credentials'
186 username: NORDIX_ARM_USERNAME
187 password: NORDIX_ARM_TOKEN
194 def build = this.getProperty('binding').getVariable('build')
195 def listener = this.getProperty('binding').getVariable('listener')
196 if (build.getEnvironment(listener).{dependency-job-var} != "SUCCESS") {{
197 println "WARN : Aborting build since dependent job did not succeed!"
198 throw new InterruptedException()
202 sudo chown -R $USER:$USER $WORKSPACE || exit 1
206 - 'generate-change-metadata-macro'
208 properties-file: "$WORKSPACE/change.properties"
209 - 'generate-ssh-keypair-macro'
210 - 'wait-pkg-mgr-macro'
212 - 'upload-artifact-macro'