name: autorelease-checkout-gerrit-patch
builders:
- shell: |
- cd ${GERRIT_PROJECT}
+ #!/bin/bash
+ set -eu -o pipefail
+
+ # If the project is autorelease then we do not need to cd
+ if [ "$GERRIT_PROJECT" != "releng/autorelease" ]; then
+ cd "$WORKSPACE/$GERRIT_PROJECT"
+ fi
+
echo "Checking out ${GERRIT_PROJECT} patch ${GERRIT_REFSPEC}..."
git fetch origin ${GERRIT_REFSPEC} && git checkout FETCH_HEAD
- cd ..
+
+ # If the project is autorelease then we need to init and update submodules
+ if [ "$GERRIT_PROJECT" == "releng/autorelease" ]; then
+ git submodule update --init
+ fi
- builder:
name: autorelease-cfp
files:
- file-id: 'autorelease-settings'
variable: 'SETTINGS_FILE'
- - file-id: 'odl-global-settings'
+ - file-id: 'global-settings'
variable: 'GLOBAL_SETTINGS_FILE'
- builder:
- shell: !include-raw: include-raw-autorelease-notify-build-failure.sh
script-only-if-succeeded: 'False'
script-only-if-failed: 'True'
-
-- publisher:
- # generate sar accounting summary and copy sar data to archive
- name: opendaylight-infra-sysstats
- publishers:
- - postbuildscript:
- builders:
- - shell: !include-raw: include-raw-autorelease-collect-sar.sh
- script-only-if-succeeded: false
- script-only-if-failed: false