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'
48 - 'ironic-release-{distro}-{stream}'
49 - 'ironic-package-{distro}-{stream}'
50 - 'ironic-release-{environment-type}-provision-{distro}-baremetal-{stream}'
51 - 'ironic-promote-{distro}-{stream}'
54 name: 'ironic-release-{distro}-{stream}'
56 project-type: multijob
58 disabled: '{obj:disabled}'
60 node: 'engine-package-{distro}-fra'
68 description: 'Branch the job is created for. DO NOT MODIFY!'
72 description: 'Distribution to provision and configre target nodes with. DO NOT MODIFY!'
75 default: '{deploy-scenario}'
76 description: 'Scenario to test change with. This depends on the branch of the stack.'
80 description: 'CI loop type. DO NOT MODIFY!'
84 description: 'Engine verbosity'
86 name: NORDIX_ENGINE_VERSION
88 description: 'Engine version of engine to package, deploy, test, release'
92 description: 'Stack to package, deploy, test, release'
96 description: 'Stack version of engine to package, deploy, test, release'
98 name: NORDIX_BIFROST_VERSION
100 description: 'Bifrost version of engine to package, deploy, test, release'
103 default: '{promote-stack}'
104 description: 'Heat version of engine to package, deploy, test, release'
108 # NOTE (fdegir): throttle categories are controlled in jenkins global configuration
115 - engine-verify-package
121 - fix-workspace-permissions
127 cron: "#H 0,8,16 * * *"
131 url: https://gerrit.nordix.org/infra/engine.git
138 - 'generate-release-metadata-macro'
140 properties-file: "$WORKSPACE/release.properties"
141 - 'generate-ssh-keypair-macro'
142 - 'wait-pkg-mgr-macro'
145 condition: SUCCESSFUL
146 execution-type: PARALLEL
148 - name: 'ironic-package-{distro}-{stream}'
149 current-parameters: false
151 node-parameters: true
152 property-file: "$WORKSPACE/release.properties"
153 kill-phase-on: FAILURE
157 condition: SUCCESSFUL
158 execution-type: PARALLEL
160 - name: 'ironic-release-offline-provision-{distro}-baremetal-{stream}'
161 current-parameters: false
163 node-parameters: false
164 property-file: "$WORKSPACE/release.properties"
165 kill-phase-on: FAILURE
169 condition: SUCCESSFUL
170 execution-type: PARALLEL
172 - name: 'ironic-promote-{distro}-{stream}'
173 current-parameters: false
175 node-parameters: true
176 property-file: "$WORKSPACE/release.properties"
177 kill-phase-on: FAILURE
181 name: 'ironic-package-{distro}-{stream}'
183 disabled: '{obj:disabled}'
191 description: 'Execution mode to run engine'
199 - credentials-binding:
200 - username-password-separated:
201 credential-id: 'nordix-cicd-arm-credentials'
202 username: NORDIX_ARM_USERNAME
203 password: NORDIX_ARM_TOKEN
205 - fix-workspace-permissions
209 url: https://gerrit.nordix.org/infra/engine.git
217 - 'upload-artifact-macro'
220 name: 'ironic-promote-{distro}-{stream}'
222 disabled: '{obj:disabled}'
232 - credentials-binding:
233 - username-password-separated:
234 credential-id: 'nordix-cicd-arm-credentials'
235 username: NORDIX_ARM_USERNAME
236 password: NORDIX_ARM_TOKEN
238 - fix-workspace-permissions
242 url: https://gerrit.nordix.org/infra/engine.git
252 name: 'ironic-release-{environment-type}-provision-{distro}-baremetal-{stream}'
254 disabled: '{obj:disabled}'
256 node: baremetal-deploy
263 default: 'offline-deployment'
264 description: 'Engine execution mode'
267 default: '{pdf}/${{NODE_NAME}}-pdf.yml'
268 description: 'PDF file to use for deployment. DO NOT MODIFY!'
271 default: '{idf}/${{NODE_NAME}}-idf.yml'
272 description: 'IDF file to use for deployment. DO NOT MODIFY!'
275 default: 'baremetal-deploy'
276 description: 'Type of the slave'
289 - fix-workspace-permissions
290 - credentials-binding:
292 credential-id: '{openrc-credentials-file}'
293 variable: OPENRC_FILE
299 sudo chown -R $USER:$USER $WORKSPACE || exit 1
300 # offline nodes can not resolve Nordix Artifactory and Gerrit
301 if [[ "$EXECUTION_MODE" == "offline-deployment" ]]; then
302 echo "Info : Offline deployment. Adding City OpenStack Endpoint, Nordix Artifactory and Gerrit Public IP to /etc/hosts"
303 sudo sed -i 's/^search/# search/' /etc/resolv.conf
304 sudo bash -c "cat << EOF >> /etc/hosts
306 91.106.198.25 artifactory.nordix.org
307 91.106.198.142 gerrit.nordix.org
308 86.107.242.50 fra1.citycloud.com
311 # we need to get rid of search domain as well
312 sudo sed -i 's/^search/# search/' /etc/resolv.conf
317 url: https://gerrit.nordix.org/infra/engine.git
324 - description-setter:
325 description: provisioning
326 - 'download-artifact-macro'
329 # vim: set ts=2 sw=2 expandtab: