This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
#Machine Readable Technique to get AMI_ID, tee forwards stdout to stderr. | |
# | |
#AMI_ID=`packer build -machine-readable packer.json | tee >(cat 1>&2) | awk -F, '$0 ~/artifact,0,id/ {print $6}'` | |
# | |
#Human readable format sends stdout to stderr, awk catches the AMI_ID. This allows output to end up in a jenkins/bamboo output. | |
# The output of the AWS builder ends with region: ami-id, So rather than have awk read the whole line... we target column 2. | |
# | |
AMI_ID=`packer build packer.json | tee >(cat 1>&2) | awk 'match($2, /ami-.*/) { print substr($2, RSTART, RLENGTH) }'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# For cygwin, APACHEBENCH could be /usr/sbin/ab2, else ab will suffice on linux/unix systems. | |
APACHEBENCH=ab | |
COOKIE_JAR="ab-cookie-jar" | |
USERNAME="foo@bar.com" | |
PASSWORD="password" | |
HOST="127.0.0.1" | |
BASEURL="http://$host" | |
LOGINURL="$baseurl/wp-login.php" |