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: 'ironic-release'
23 project: 'ironic-release'
28 deploy-scenario: 'k8-multus-plugins'
34 execution-mode: offline-deployment
35 pdf: 'file:///opt/engine/offline/git/hwconfig/pods'
36 idf: 'file:///opt/engine/offline/git/hwconfig/pods'
37 openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
47 - 'ironic-release-{distro}-{stream}'
48 - 'ironic-package-{distro}-{stream}'
49 - 'ironic-release-{environment-type}-provision-{distro}-baremetal-{stream}'
50 - 'ironic-promote-{distro}-{stream}'
53 name: 'ironic-release-{distro}-{stream}'
55 project-type: multijob
57 disabled: '{obj:disabled}'
59 node: 'engine-package-{distro}-fra'
67 description: 'Branch the job is created for. DO NOT MODIFY!'
71 description: 'Distribution to provision and configre target nodes with. DO NOT MODIFY!'
74 default: '{deploy-scenario}'
75 description: 'Scenario to test change with. This depends on the branch of the stack.'
79 description: 'CI loop type. DO NOT MODIFY!'
83 description: 'Engine verbosity'
85 name: NORDIX_ENGINE_VERSION
87 description: 'Engine version of engine to package, deploy, test, release'
91 description: 'Stack to package, deploy, test, release'
95 description: 'Stack version of engine to package, deploy, test, release'
97 name: NORDIX_BIFROST_VERSION
99 description: 'Bifrost version of engine to package, deploy, test, release'
102 default: '{promote-stack}'
103 description: 'Heat version of engine to package, deploy, test, release'
107 # NOTE (fdegir): throttle categories are controlled in jenkins global configuration
114 - engine-verify-package
120 - fix-workspace-permissions
126 cron: "#H 0,8,16 * * *"
130 url: https://gerrit.nordix.org/infra/engine.git
137 - 'generate-release-metadata-macro'
139 properties-file: "$WORKSPACE/release.properties"
140 - 'generate-ssh-keypair-macro'
141 - 'wait-pkg-mgr-macro'
144 condition: SUCCESSFUL
145 execution-type: PARALLEL
147 - name: 'ironic-package-{distro}-{stream}'
148 current-parameters: false
150 node-parameters: true
151 property-file: "$WORKSPACE/release.properties"
152 kill-phase-on: FAILURE
156 condition: SUCCESSFUL
157 execution-type: PARALLEL
159 - name: 'ironic-release-offline-provision-{distro}-baremetal-{stream}'
160 current-parameters: false
162 node-parameters: false
163 property-file: "$WORKSPACE/release.properties"
164 kill-phase-on: FAILURE
168 condition: SUCCESSFUL
169 execution-type: PARALLEL
171 - name: 'ironic-promote-{distro}-{stream}'
172 current-parameters: false
174 node-parameters: true
175 property-file: "$WORKSPACE/release.properties"
176 kill-phase-on: FAILURE
180 name: 'ironic-package-{distro}-{stream}'
182 disabled: '{obj:disabled}'
190 description: 'Execution mode to run engine'
198 - credentials-binding:
199 - username-password-separated:
200 credential-id: 'nordix-cicd-arm-credentials'
201 username: NORDIX_ARM_USERNAME
202 password: NORDIX_ARM_TOKEN
204 - fix-workspace-permissions
208 url: https://gerrit.nordix.org/infra/engine.git
216 - 'upload-artifact-macro'
219 name: 'ironic-promote-{distro}-{stream}'
221 disabled: '{obj:disabled}'
231 - credentials-binding:
232 - username-password-separated:
233 credential-id: 'nordix-cicd-arm-credentials'
234 username: NORDIX_ARM_USERNAME
235 password: NORDIX_ARM_TOKEN
237 - fix-workspace-permissions
241 url: https://gerrit.nordix.org/infra/engine.git
251 name: 'ironic-release-{environment-type}-provision-{distro}-baremetal-{stream}'
253 disabled: '{obj:disabled}'
255 node: baremetal-deploy
262 default: 'offline-deployment'
263 description: 'Engine execution mode'
266 default: '{pdf}/${{NODE_NAME}}-pdf.yml'
267 description: 'PDF file to use for deployment. DO NOT MODIFY!'
270 default: '{idf}/${{NODE_NAME}}-idf.yml'
271 description: 'IDF file to use for deployment. DO NOT MODIFY!'
274 default: 'baremetal-deploy'
275 description: 'Type of the slave'
288 - fix-workspace-permissions
289 - credentials-binding:
291 credential-id: '{openrc-credentials-file}'
292 variable: OPENRC_FILE
298 sudo chown -R $USER:$USER $WORKSPACE || exit 1
299 # offline nodes can not resolve Nordix Artifactory and Gerrit
300 if [[ "$EXECUTION_MODE" == "offline-deployment" ]]; then
301 echo "Info : Offline deployment. Adding City OpenStack Endpoint, Nordix Artifactory and Gerrit Public IP to /etc/hosts"
302 sudo sed -i 's/^search/# search/' /etc/resolv.conf
303 sudo bash -c "cat << EOF >> /etc/hosts
305 91.106.198.25 artifactory.nordix.org
306 91.106.198.142 gerrit.nordix.org
307 86.107.242.50 fra1.citycloud.com
310 # we need to get rid of search domain as well
311 sudo sed -i 's/^search/# search/' /etc/resolv.conf
316 url: https://gerrit.nordix.org/infra/engine.git
323 - description-setter:
324 description: provisioning
325 - 'download-artifact-macro'
328 # vim: set ts=2 sw=2 expandtab: