Skip to content

Instantly share code, notes, and snippets.

@higebu
Created July 12, 2014 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save higebu/83411c147ecea888070c to your computer and use it in GitHub Desktop.
Save higebu/83411c147ecea888070c to your computer and use it in GitHub Desktop.
a shell script for packer build with vagrant-cloud
#!/bin/bash
VERSION=$1
VAGRANT_CLOUD_TOKEN=$2
TYPE=$3
FLAG=1
while [ $FLAG -eq 1 ] ; do
PACKER_LOG=1 packer build -var "version=$VERSION" -var "cloud_token=$VAGRANT_CLOUD_TOKEN" -only="$TYPE"-iso template.json
FLAG=$?
if [ $FLAG -eq 1 ] ; then
rm vyos-1.0.4-amd64_$TYPE.box
sleep 10
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment