mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 14:17:22 +00:00
* create packer.sh deployment file Copy from terraform.sh * add packer.sh to provisioner add packer.sh script to provisioner to install packer. * add packer.sh to provisioner Add packer.sh script to provisioner to install packer * remove blank lines removed blank lines as requested in feedback by alepauly. * remove additional blank lines * Add Install-Packer.ps1 This script installs packer on Windows through chocolatey * Create Validate-Packer.ps1 This script validates the installation of Packer from Install-Packer.ps1 and adds the software details to the markdown files. * Add Packer install and validate script Added Packer install script and validate script to provisioners. * Add Packer install script and validation script Add Packer install and validation script to provisioners.
This commit is contained in:
25
images/linux/scripts/installers/packer.sh
Normal file
25
images/linux/scripts/installers/packer.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: packer.sh
|
||||
## Desc: Installs packer
|
||||
################################################################################
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/apt.sh
|
||||
|
||||
# Install Packer
|
||||
PACKER_VERSION=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | jq -r .current_version)
|
||||
curl -LO "https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip"
|
||||
unzip "packer_${PACKER_VERSION}_linux_amd64.zip" -d /usr/local/bin
|
||||
rm -f "packer_${PACKER_VERSION}_linux_amd64.zip"
|
||||
|
||||
# Run tests to determine that the software installed as expected
|
||||
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
||||
if ! command -v packer; then
|
||||
echo "Packer was not installed or found on PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Document what was added to the image
|
||||
echo "Lastly, documenting what we added to the metadata file"
|
||||
DocumentInstalledItem "Packer ($(packer --version))"
|
||||
Reference in New Issue
Block a user