File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change 77 - DIST=trusty
88 global :
99 # 20170821: as of writing there is no 'latest' (hashicorp/packer/issues/5265)
10- - PACKER_ZIP="packer_1.2.1_linux_amd64.zip"
11- - PACKER_URL="https://releases.hashicorp.com/packer/1.2.1/packer_1.2.1_linux_amd64.zip"
10+ - PACKER_CURRENT_VERSION="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | jq -r -M '.current_version')"
11+ - PACKER_URL="https://releases.hashicorp.com/packer/$PACKER_CURRENT_VERSION/packer_${PACKER_CURRENT_VERSION}_linux_amd64.zip"
12+ - PACKER_SHA256="https://releases.hashicorp.com/packer/$PACKER_CURRENT_VERSION/packer_${PACKER_CURRENT_VERSION}_SHA256SUMS"
13+ - PACKER_SHA256_SIG="https://releases.hashicorp.com/packer/$PACKER_CURRENT_VERSION/packer_${PACKER_CURRENT_VERSION}_SHA256SUMS.sig"
14+ - HASHICORP_FINGERPRINT=91a6e7f85d05c65630bef18951852d87348ffc4c
15+ - HASHICORP_KEY="https://keybase.io/hashicorp/pgp_keys.asc?fingerprint=${HASHICORP_FINGERPRINT}"
1216
1317install :
14- - wget "${PACKER_URL}"
15- - unzip "${PACKER_ZIP}"
18+ - wget ${PACKER_URL}
19+ - wget ${PACKER_SHA256}
20+ - wget ${PACKER_SHA256_SIG}
21+ - wget -O hashicorp.key ${HASHICORP_KEY}
22+ - gpg --with-fingerprint --with-colons hashicorp.key | grep ${HASHICORP_FINGERPRINT^^}
23+ - gpg --import hashicorp.key
24+ - gpg --verify packer_${PACKER_CURRENT_VERSION}_SHA256SUMS.sig packer_${PACKER_CURRENT_VERSION}_SHA256SUMS
25+ - grep linux_amd64 packer_${PACKER_CURRENT_VERSION}_SHA256SUMS > packer_SHA256SUM_linux_amd64
26+ - sha256sum --check --status packer_SHA256SUM_linux_amd64
27+ - unzip packer_${PACKER_CURRENT_VERSION}_linux_amd64.zip
1628
1729script :
1830- ./packer --version
You can’t perform that action at this time.
0 commit comments