Netflix / aminator

A tool for creating EBS AMIs. This tool currently works for CentOS/RedHat Linux images and is intended to run on an EC2 instance.
Apache License 2.0
950 stars 170 forks source link

Logging AMI ID #211

Closed willtrking closed 8 years ago

willtrking commented 10 years ago

This pull would add in methods to both save and read the registered AMI ID. It also uses those methods to log the AMI ID as the last line of logging output, instead of 'Amination Complete!' This allows for the AMI ID to be more easily machine readable. Here's a bash example that does just that using tail and awk.

aminate ....args... 2> stderr.log >stdout.log
LAST_LINE=$(tail -n 1 stdout.log)
AMI_ID=$(echo $LAST_LINE | awk '{print substr($0,index($0,"AMI: ")+5)}')

Sorry to keep inundating you guys with these requests

cloudbees-pull-request-builder commented 10 years ago

aminator-pull-requests #190 FAILURE Looks like there's a problem with this pull request

cloudbees-pull-request-builder commented 10 years ago

aminator-pull-requests #191 SUCCESS This pull request looks good