From: Thanh Ha Date: Fri, 19 Jan 2018 01:16:13 +0000 (-0500) Subject: Split maven-stage script into a reusable macro X-Git-Tag: v0.16.0~10 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=76a760c1a39a38def2b9c5642645abf5abde83f3;p=releng%2Fglobal-jjb.git Split maven-stage script into a reusable macro Change-Id: If8d2208e2469d295637a9e82545b2289e5a7588b Signed-off-by: Thanh Ha --- diff --git a/docs/jjb/lf-maven-jobs.rst b/docs/jjb/lf-maven-jobs.rst index 8a0f94da..71b6893f 100644 --- a/docs/jjb/lf-maven-jobs.rst +++ b/docs/jjb/lf-maven-jobs.rst @@ -62,6 +62,11 @@ lf-maven-deploy Calls the maven deploy script to push artifacts to Nexus. +lf-maven-stage +--------------- + +Calls the maven stage script to push artifacts to a Nexus staging repository. + Job Templates ============= diff --git a/jjb/lf-maven-jobs.yaml b/jjb/lf-maven-jobs.yaml index cc711a66..9f7173ab 100644 --- a/jjb/lf-maven-jobs.yaml +++ b/jjb/lf-maven-jobs.yaml @@ -59,6 +59,13 @@ - ../shell/common-variables.sh - ../shell/maven-deploy.sh +- builder: + name: lf-maven-stage + builders: + - shell: !include-raw-escape: + - ../shell/common-variables.sh + - ../shell/maven-stage.sh + - builder: name: lf-update-java-alternatives builders: @@ -648,7 +655,7 @@ - ../shell/common-variables.sh - ../shell/maven-patch-release.sh - ../shell/maven-build.sh - - ../shell/maven-stage.sh + - lf-maven-stage - lf-provide-maven-settings-cleanup - job-template: diff --git a/shell/maven-stage.sh b/shell/maven-stage.sh index 74b74a99..a525c2cb 100644 --- a/shell/maven-stage.sh +++ b/shell/maven-stage.sh @@ -18,6 +18,8 @@ # 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")