Don't try to pushd into dir that doesn't exist
[releng/global-jjb.git] / .jjb-test / expected-xml / gerrit-ciman-packer-merge-ubuntu1604-mininet
index 19656c5..1670405 100644 (file)
@@ -240,12 +240,12 @@ if hash packer.io 2>/dev/null; then
 else
     echo "packer.io command not is available. Installing packer ..."
     # Installs Hashicorp's Packer binary, required for verify & merge packer jobs
-    pushd packer
+    pushd "${WORKSPACE}"
     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/
+    unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d "${WORKSPACE}/bin/"
     # rename packer to avoid conflict with binary in cracklib
-    mv ${WORKSPACE}/bin/packer "${WORKSPACE}/bin/packer.io"
+    mv "${WORKSPACE}/bin/packer" "${WORKSPACE}/bin/packer.io"
     popd
 fi
 
@@ -358,12 +358,12 @@ if hash packer.io 2>/dev/null; then
 else
     echo "packer.io command not is available. Installing packer ..."
     # Installs Hashicorp's Packer binary, required for verify & merge packer jobs
-    pushd packer
+    pushd "${WORKSPACE}"
     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/
+    unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d "${WORKSPACE}/bin/"
     # rename packer to avoid conflict with binary in cracklib
-    mv ${WORKSPACE}/bin/packer "${WORKSPACE}/bin/packer.io"
+    mv "${WORKSPACE}/bin/packer" "${WORKSPACE}/bin/packer.io"
     popd
 fi