mirror of
https://github.com/CopterExpress/clover_vm.git
synced 2026-05-26 07:07:58 +00:00
build: Download Packer in CI environment (hack)
This commit is contained in:
10
build.sh
10
build.sh
@@ -1,20 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
PACKER=$(which packer)
|
||||
# FIXME: Use system Packer if possible
|
||||
#PACKER=$(which packer)
|
||||
|
||||
if [ "x${PACKER}" == "x" ]; then
|
||||
#if [ "x${PACKER}" == "x" ]; then
|
||||
PACKER="./packer"
|
||||
if [ ! -f ${PACKER} ]; then
|
||||
echo "Packer not found; downloading v1.5.4 from Hashicorp"
|
||||
wget https://releases.hashicorp.com/packer/1.5.4/packer_1.5.4_linux_amd64.zip
|
||||
unzip packer_1.5.4_linux_amd64.zip
|
||||
rm packer_1.5.4_linux_amd64.zip
|
||||
PACKER="./packer"
|
||||
fi
|
||||
|
||||
echo "--- Using Packer version $(${PACKER} --version)"
|
||||
|
||||
echo "--- Building base image"
|
||||
|
||||
${PACKER} build base_vm.json
|
||||
${PACKER} build -only=virtualbox-iso base_vm.json
|
||||
|
||||
echo "--- Building extended image"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user