Skip to content

Instantly share code, notes, and snippets.

@swade1987
Created April 6, 2016 20:49
Show Gist options
  • Select an option

  • Save swade1987/59d6784f7575f3f1cd241e6f41d3976b to your computer and use it in GitHub Desktop.

Select an option

Save swade1987/59d6784f7575f3f1cd241e6f41d3976b to your computer and use it in GitHub Desktop.
#!/bin/bash
## Execute the CI task from the Rakefile
#sudo $(which chef) exec rake ci
## Obtain the source AMI to use for our Packer build.
base_ami_id = $(aws ec2 describe-images --filters Name=tag-key,Values=ami Name=tag-value,Values=aws-ubuntu-base --output text --query 'Images[0].ImageId')
echo $base_ami_id
## Build an AMI for this cookbook
$(which chef) exec rake packer[$base_ami_id]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment