From: Thanh Ha Date: Wed, 28 Feb 2018 01:53:04 +0000 (+0000) Subject: Merge "Add triggers to jenkins-cfg job" X-Git-Tag: v0.17.0~8 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=034c644943cad95457b9086c922dbdb74fb848e0;hp=2ea5908d7197fd2a895e1992920db2d7cfdf64d7;p=releng%2Fglobal-jjb.git Merge "Add triggers to jenkins-cfg job" --- diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index cd3172b1..b2482c12 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -80,7 +80,11 @@ name: lf-update-java-alternatives builders: - inject: - properties-content: 'SET_JDK_VERSION={java-version}' + # Work around inject plugin overriding our GIT_URL variable incorrectly + # https://issues.jenkins-ci.org/browse/JENKINS-49775 + properties-content: | + SET_JDK_VERSION={java-version} + GIT_URL="$GIT_URL" - shell: !include-raw-escape: ../shell/update-java-alternatives.sh - inject: properties-file: '/tmp/java.env' diff --git a/shell/gerrit-fetch-dependencies.sh b/shell/gerrit-fetch-dependencies.sh index 99a71f02..55c0cf1c 100644 --- a/shell/gerrit-fetch-dependencies.sh +++ b/shell/gerrit-fetch-dependencies.sh @@ -41,6 +41,11 @@ for patch in $(echo "${PATCHES[@]}"); do project=$(echo "$json" | jq -r '.project') branch=$(echo "$json" | jq -r '.branch') + if [ "$GERRIT_CHANGE_NUMBER" == "$patch" ]; then + echo "WARN: GERRIT_CHANGE and $patch are one and the same. Ignoring patch..." + continue + fi + if [ ! -d "$REPOS_DIR/$project" ]; then git clone -q --depth 1 -b "$branch" "$GIT_URL/$project" "$REPOS_DIR/$project"