- builder:
    name: gerrit-git-prep
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/gerrit-git-prep.sh https://review.openstack.org https://review.openstack.org"

- builder:
    name: ci-config-prep
    builders:
      - shell: |
            git clone https://git.openstack.org/openstack/sahara-ci-config
            wget https://sahara.mirantis.com/files/patch_map
            wget https://sahara.mirantis.com/files/check_ci_ancillary_patches.sh
            chmod +x check_ci_ancillary_patches.sh
            ./check_ci_ancillary_patches.sh

# ======================================================================

- publisher:
    name: sahara-logs
    publishers:
      - scp:
          site: 'localhost'
          files:
            - target: 'logs/$LOG_PATH'
              source: '**/logs/*.txt'
              copy-after-failure: true

- publisher:
    name: console-log
    publishers:
      - scp:
          site: 'localhost'
          files:
            - target: 'logs/$LOG_PATH'
              copy-console: true
              copy-after-failure: true

- publisher:
    name: trigger-cleanup
    publishers:
      - trigger-parameterized-builds:
          - project: "integration-cleanup"
            predefined-parameters:
               "CHANGE_NUMBER=$ZUUL_CHANGE\
               \nPREV_JOB=$JOB_NAME\
               \nHOST_NAME=$NODE_NAME\
               \nCLUSTER_HASH=$CLUSTER_HASH"