The changes are tested with the below job
https://jenkins.hyperledger.org/job/ci-management-packer-verify/4/console
Also supress wget verbose output.
Jira: releng-442
Change-Id: Icab1214c19e68346a84c37179a1d8c1540ffc657
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# 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
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
mkdir -p "${WORKSPACE}/bin"
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d ${WORKSPACE}/bin/
# rename packer to avoid conflict with binary in cracklib