2020-10-07 13:49:40 +05:00
|
|
|
#!/bin/bash -e
|
2020-03-04 15:42:36 +01:00
|
|
|
################################################################################
|
2023-11-22 21:49:23 +01:00
|
|
|
## File: install-packer.sh
|
|
|
|
|
## Desc: Install packer
|
2020-03-04 15:42:36 +01:00
|
|
|
################################################################################
|
2020-09-17 14:15:31 +03:00
|
|
|
|
2023-12-29 12:36:27 +01:00
|
|
|
# Source the helpers for use with the script
|
2022-05-23 22:47:07 +09:00
|
|
|
source $HELPER_SCRIPTS/install.sh
|
|
|
|
|
|
2020-03-04 15:42:36 +01:00
|
|
|
# Install Packer
|
2023-11-29 20:25:29 +01:00
|
|
|
download_url=$(curl -fsSL https://api.releases.hashicorp.com/v1/releases/packer/latest | jq -r '.builds[] | select((.arch=="amd64") and (.os=="linux")).url')
|
|
|
|
|
archive_path=$(download_with_retry "$download_url")
|
2024-04-25 12:13:07 +02:00
|
|
|
unzip -o -qq "$archive_path" -d /usr/local/bin
|
2020-03-04 15:42:36 +01:00
|
|
|
|
2023-11-22 21:49:23 +01:00
|
|
|
invoke_tests "Tools" "Packer"
|