Make sure that jjb-cleanup.sh allows unbound vars
[releng/global-jjb.git] / shell / maven-stage.sh
index d39d773..ea8652d 100644 (file)
@@ -1,5 +1,5 @@
-#!/bin/bash
-# @License EPL-1.0 <http://spdx.org/licenses/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"
@@ -27,4 +27,4 @@ mkdir -p "$WORKSPACE/archives"
 echo "$staging_repo" > "$WORKSPACE/archives/staging-repo.txt"
 
 # Cleanup
-rm "$TMP_FILE"
+rm -f "$TMP_FILE"