+ dependency-jobs: '{dependency-jobs}'
+
+ wrappers:
+ - build-timeout:
+ timeout: 180
+ - credentials-binding:
+ - file:
+ credential-id: '{openrc-credentials-file}'
+ variable: OPENRC_FILE
+ - username-password-separated:
+ credential-id: 'nordix-cicd-arm-credentials'
+ username: NORDIX_ARM_USERNAME
+ password: NORDIX_ARM_TOKEN
+ - mask-passwords
+ - openstack:
+ single-use: True
+ - pre-scm-buildstep:
+ failOnError: true
+ buildsteps:
+ - system-groovy:
+ command: |
+ def build = this.getProperty('binding').getVariable('build')
+ def listener = this.getProperty('binding').getVariable('listener')
+ if (build.getEnvironment(listener).{dependency-job-var} != "SUCCESS") {{
+ println "WARN : Aborting build since dependent job did not succeed!"
+ throw new InterruptedException()
+ }}
+ - shell: |
+ #!/bin/bash
+ sudo chown -R $USER:$USER $WORKSPACE || exit 1
+ # offline nodes can not resolve Nordix Artifactory and Gerrit
+ if [[ "$EXECUTION_MODE" == "offline-deployment" ]]; then
+ echo "Info : Offline deployment. Adding City OpenStack Endpoint, Nordix Artifactory and Gerrit Public IP to /etc/hosts"
+ sudo sed -i 's/^search/# search/' /etc/resolv.conf
+ sudo bash -c "cat << EOF >> /etc/hosts
+ # managed by engine
+ 91.106.198.25 artifactory.nordix.org
+ 91.106.198.142 gerrit.nordix.org
+ 86.107.242.50 fra1.citycloud.com
+ # managed by engine
+ EOF"
+ # we need to get rid of search domain as well
+ sudo sed -i 's/^search/# search/' /etc/resolv.conf
+ fi