X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fmaven-stage.sh;h=fa890475186aebf2ce6534cf95c182a74215aa87;hb=2a10c83b2d506008cc6c01c134515fb6328e1f3a;hp=482b53f486faba656454fcb131e8e9a3209d05ee;hpb=a99cfe8b7c3e3b33cf9f210a90c50ea65128b30e;p=releng%2Fglobal-jjb.git diff --git a/shell/maven-stage.sh b/shell/maven-stage.sh index 482b53f4..fa890475 100644 --- a/shell/maven-stage.sh +++ b/shell/maven-stage.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -l # SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2017 The Linux Foundation and others. @@ -8,7 +8,7 @@ # which accompanies this distribution, and is available at # http://www.eclipse.org/legal/epl-v10.html ############################################################################## - +echo "---> maven-stage.sh" # This script publishes artifacts to a staging repo in Nexus. # # $WORKSPACE/m2repo : Exists and used to deploy the staging repository. @@ -16,7 +16,7 @@ # $STAGING_PROFILE_ID : Provided by a job parameter. # Ensure we fail the job if any steps fail. -set -eu -o pipefail +set -xeu -o pipefail TMP_FILE="$(mktemp)" lftools deploy nexus-stage "$NEXUS_URL" "$STAGING_PROFILE_ID" "$WORKSPACE/m2repo" | tee "$TMP_FILE" @@ -24,7 +24,7 @@ staging_repo=$(sed -n -e 's/Staging repository \(.*\) created\./\1/p' "$TMP_FILE # Store repo info to a file in archives mkdir -p "$WORKSPACE/archives" -echo "$staging_repo" > "$WORKSPACE/archives/staging-repo.txt" +echo "$staging_repo ${NEXUS_URL}/content/repositories/$staging_repo" | tee -a "$WORKSPACE/archives/staging-repo.txt" # Cleanup -rm "$TMP_FILE" +rm -f "$TMP_FILE"