Split maven-stage script into a reusable macro 37/8437/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 19 Jan 2018 01:16:13 +0000 (20:16 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 2 Feb 2018 01:00:42 +0000 (20:00 -0500)
Change-Id: If8d2208e2469d295637a9e82545b2289e5a7588b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
docs/jjb/lf-maven-jobs.rst
jjb/lf-maven-jobs.yaml
shell/maven-stage.sh

index 8a0f94d..71b6893 100644 (file)
@@ -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
 =============
 
index cc711a6..9f7173a 100644 (file)
           - ../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:
           - ../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:
index 74b74a9..a525c2c 100644 (file)
@@ -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")