X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fmaven-stage.sh;h=ea8652dcc3640f6a7c42cf32954fd854aa811e02;hb=407b9b1a5f36d7bbdf86bc8480768878292b3349;hp=09681eb42805b5e821c3c5e40c672b66cfcee5bd;hpb=34ab3807fb760dea4fdfc08b1692d49a243759f1;p=releng%2Fglobal-jjb.git diff --git a/shell/maven-stage.sh b/shell/maven-stage.sh index 09681eb4..ea8652dc 100644 --- a/shell/maven-stage.sh +++ b/shell/maven-stage.sh @@ -1,5 +1,5 @@ -#!/bin/bash -# @License EPL-1.0 +#!/bin/bash -l +# SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2017 The Linux Foundation and others. # @@ -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" > "$WORSPACE/archives/staging-repo.txt" +echo "$staging_repo" > "$WORKSPACE/archives/staging-repo.txt" # Cleanup -rm "$TMP_FILE" +rm -f "$TMP_FILE"