Skip to content

Instantly share code, notes, and snippets.

@pgporada
Created February 21, 2017 04:11
Show Gist options
  • Save pgporada/8b5513681fe59d7d5aacaeb29324a491 to your computer and use it in GitHub Desktop.
Save pgporada/8b5513681fe59d7d5aacaeb29324a491 to your computer and use it in GitHub Desktop.
Script to run against a packer image
$ cat scripts/serverspec.sh
#!/bin/bash
# WHAT: Run serverspec tests that Packer copies up to the server. You'll need a ruby environment with bundler and gem.
cd /tmp/tests
/usr/local/bin/bundler install --no-deployment
/usr/local/bin/bundler exec rake spec
cd /tmp
rm -rf /tmp/tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment