Remove port from NEXUS_URL for netrc
[releng/global-jjb.git] / .jjb-test / expected-xml / github-ciman-packer-merge-centos-mininet
index 9fb389f..218288e 100644 (file)
@@ -188,16 +188,14 @@ PACKER_VERSION="${PACKER_VERSION:-1.0.2}"
 
 # Ensure we fail the job if any steps fail.
 set -eu -o pipefail
-# Default packer binary made available on the build image
-packer_bin="/usr/local/bin/packer.io"
 
-if hash "$packer_bin" 2>/dev/null; then
+if hash packer.io 2>/dev/null; then
     echo "packer.io command is available."
 else
     echo "packer.io command not is available. Installing packer ..."
     # Installs Hashicorp's Packer binary, required for verify & merge packer jobs
     pushd packer
-    wget "https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip"
+    wget -nv "https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip"
     mkdir -p "${WORKSPACE}/bin"
     unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
     # rename packer to avoid conflict with binary in cracklib
@@ -300,16 +298,14 @@ PACKER_VERSION="${PACKER_VERSION:-1.0.2}"
 
 # Ensure we fail the job if any steps fail.
 set -eu -o pipefail
-# Default packer binary made available on the build image
-packer_bin="/usr/local/bin/packer.io"
 
-if hash "$packer_bin" 2>/dev/null; then
+if hash packer.io 2>/dev/null; then
     echo "packer.io command is available."
 else
     echo "packer.io command not is available. Installing packer ..."
     # Installs Hashicorp's Packer binary, required for verify & merge packer jobs
     pushd packer
-    wget "https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip"
+    wget -nv "https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip"
     mkdir -p "${WORKSPACE}/bin"
     unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
     # rename packer to avoid conflict with binary in cracklib
@@ -466,7 +462,7 @@ machine=$(echo "$NEXUS_URL" | awk -F/ '{print $3}')
 user=$(echo "$CREDENTIAL" | cut -f1 -d:)
 pass=$(echo "$CREDENTIAL" | cut -f2 -d:)
 
-echo "machine $machine login $user password $pass" > ~/.netrc
+echo "machine ${machine%:*} login $user password $pass" > ~/.netrc
 </command>
         </hudson.tasks.Shell>
         <hudson.tasks.Shell>