From: Thanh Ha Date: Thu, 13 Sep 2018 23:38:34 +0000 (-0400) Subject: Update maven-stage jobs to use lf-infra-pre-build X-Git-Tag: v0.24.3~5 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=ac3415e0339d82b1695d0d61534209f46b90375e;p=releng%2Fglobal-jjb.git Update maven-stage jobs to use lf-infra-pre-build Use lf-infra-pre-build to install lftools via --user config. This resolves the post-build issues caused by `pip install` due to virtualenvs messing with the environment. Change-Id: Iccd72e6f1d580037f55bff3199d05d467de17c58 Signed-off-by: Thanh Ha --- diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index 6f80fb57..81c5fd25 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -72,9 +72,7 @@ name: lf-maven-stage builders: # include-raw-escape fails due to JJB bug - - shell: !include-raw: - - ../shell/common-variables.sh - - ../shell/maven-stage.sh + - shell: !include-raw: ../shell/maven-stage.sh - builder: name: lf-update-java-alternatives @@ -739,6 +737,7 @@ description: Nexus staging profile ID. builders: + - lf-infra-pre-build - lf-jacoco-nojava-workaround - lf-maven-install: mvn-version: '{mvn-version}' @@ -749,9 +748,7 @@ settings-file: '{mvn-settings}' - lf-infra-create-netrc: server-id: '{mvn-staging-id}' - - shell: !include-raw-escape: - - ../shell/lftools-install.sh - - ../shell/maven-patch-release.sh + - shell: !include-raw-escape: ../shell/maven-patch-release.sh - lf-maven-build: mvn-goals: '{mvn-goals}' - lf-maven-stage diff --git a/shell/maven-stage.sh b/shell/maven-stage.sh index bcac7f65..ea8652dc 100644 --- a/shell/maven-stage.sh +++ b/shell/maven-stage.sh @@ -18,8 +18,6 @@ # Ensure we fail the job if any steps fail. set -xeu -o pipefail -lftools_activate - TMP_FILE="$(mktemp)" lftools deploy nexus-stage "$NEXUS_URL" "$STAGING_PROFILE_ID" "$WORKSPACE/m2repo" | tee "$TMP_FILE" staging_repo=$(sed -n -e 's/Staging repository \(.*\) created\./\1/p' "$TMP_FILE") @@ -29,4 +27,4 @@ mkdir -p "$WORKSPACE/archives" echo "$staging_repo" > "$WORKSPACE/archives/staging-repo.txt" # Cleanup -rm "$TMP_FILE" +rm -f "$TMP_FILE"