X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fpacker-install.sh;h=8b3ef6d54986b92703907e14569dcebdb8c12c0d;hb=7481ff9faf394dc6c023b2f0d7a635f24fdbb499;hp=feecf05f9c853912b007cef5626bf676aa56249c;hpb=8a9a1c05a609139c40285108eae1db58aa55d580;p=releng%2Fglobal-jjb.git diff --git a/shell/packer-install.sh b/shell/packer-install.sh index feecf05f..8b3ef6d5 100644 --- a/shell/packer-install.sh +++ b/shell/packer-install.sh @@ -15,6 +15,7 @@ echo "---> packer-install.sh" # $PACKER_VERSION : Define a packer version passed as job paramter PACKER_VERSION="${PACKER_VERSION:-1.1.3}" +export PATH="${WORKSPACE}/bin:$PATH" # Ensure we fail the job if any steps fail. set -eu -o pipefail @@ -24,11 +25,11 @@ 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