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-calico-nofeature'
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'
73 dependency-jobs: 'kubernetes-verify-tox-{stream}'
74 dependency-job-var: 'TRIGGER_kubernetes_verify_tox_{stream}_BUILD_RESULT'
77 - 'kubernetes-verify-package-{distro}-{stream}'
80 name: 'kubernetes-verify-package-{distro}-{stream}'
82 disabled: '{obj:disabled}'
89 default: '{deploy-scenario}'
90 description: 'Scenario to test change with.'
93 default: '{execution-mode}'
94 description: 'Engine execution mode - packaging'
98 description: 'Distribution to use for configuring target nodes (networking etc.)'
102 description: 'Verbosity setting for the engine - true or false - default is false'
106 description: 'CI loop type'
109 default: 'engine-package-{distro}-fra'
110 description: 'Slave label to schedule this job on.'
111 - project-parameters:
112 project: $GERRIT_PROJECT
114 description: 'The project and branch which the change is proposed for'
115 - nordix-gerrit-parameters
119 # NOTE (fdegir): throttle categories are controlled in jenkins global configuration
126 - engine-verify-package
130 ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
131 branch: $GERRIT_BRANCH
132 refspec: $GERRIT_REFSPEC
138 server-name: 'Nordix Gerrit'
140 - patchset-created-event:
141 exclude-drafts: 'false'
142 exclude-trivial-rebase: 'false'
143 exclude-no-code-change: 'false'
144 - draft-published-event
145 - comment-added-contains-event:
146 comment-contains-value: 'recheck'
147 - comment-added-contains-event:
148 comment-contains-value: 'reverify'
150 - project-compare-type: 'REG_EXP'
151 project-pattern: '{gated-projects}'
153 - branch-compare-type: 'ANT'
154 branch-pattern: '**/{branch}'
155 disable-strict-forbidden-file-verification: 'true'
156 forbidden-file-paths:
158 pattern: 'docs/**|releasenotes/**'
160 successful: '{obj:successful}'
161 failed: '{obj:failed}'
162 unstable: '{obj:unstable}'
163 notbuilt: '{obj:notbuilt}'
164 custom-url: '* $JOB_NAME $BUILD_URL'
165 readable-message: 'true'
166 dependency-jobs: '{dependency-jobs}'
173 - credentials-binding:
174 - username-password-separated:
175 credential-id: 'nordix-cicd-arm-credentials'
176 username: NORDIX_ARM_USERNAME
177 password: NORDIX_ARM_TOKEN
184 def build = this.getProperty('binding').getVariable('build')
185 def listener = this.getProperty('binding').getVariable('listener')
186 if (build.getEnvironment(listener).{dependency-job-var} != "SUCCESS") {{
187 println "WARN : Aborting build since dependent job did not succeed!"
188 throw new InterruptedException()
192 sudo chown -R $USER:$USER $WORKSPACE || exit 1
196 - 'generate-change-metadata-macro'
198 properties-file: "$WORKSPACE/change.properties"
199 - 'generate-ssh-keypair-macro'
200 - 'wait-pkg-mgr-macro'
202 - 'upload-artifact-macro'