aboutsummaryrefslogtreecommitdiff
path: root/release/Makefile.ec2
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2018-07-17 19:05:30 +0000
committerColin Percival <cperciva@FreeBSD.org>2018-07-17 19:05:30 +0000
commita6fe18b04bd9313c1b11a5faa7f99d2d61d97a31 (patch)
tree9b8768ad4d48240b64b437771caeb8cff55108a6 /release/Makefile.ec2
parent761d344c16f46623e076a8f67c544f9f3d650471 (diff)
downloadsrc-a6fe18b04bd9313c1b11a5faa7f99d2d61d97a31.tar.gz
src-a6fe18b04bd9313c1b11a5faa7f99d2d61d97a31.zip
Teach EC2 AMI release code to send an SNS notification after publishing
new AMIs if EC2SNSTOPIC is defined. Reviewed by: gjb Requested by: Amazon
Notes
Notes: svn path=/head/; revision=336420
Diffstat (limited to 'release/Makefile.ec2')
-rw-r--r--release/Makefile.ec29
1 files changed, 8 insertions, 1 deletions
diff --git a/release/Makefile.ec2 b/release/Makefile.ec2
index b413ea5505f6..329b345c1f37 100644
--- a/release/Makefile.ec2
+++ b/release/Makefile.ec2
@@ -11,6 +11,12 @@ AMINAMESUFFIX!= date +-%Y-%m-%d
.if defined(EC2PUBLIC)
PUBLISH= --public
.endif
+.if defined(EC2SNSTOPIC)
+EC2SNSREL= ${REVISION}-${BRANCH}
+EC2_SVNBRANCH!= svn info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///'
+EC2_SVNREV!= svn info --show-item last-changed-revision ${WORLDDIR}
+EC2SNSVERS= ${EC2_SVNBRANCH}@${EC2_SVNREV}
+.endif
CLEANFILES+= ec2ami
@@ -55,5 +61,6 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL}
${.OBJDIR}/ec2.raw \
"${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \
"${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \
- ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE}
+ ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \
+ ${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS}
@touch ${.TARGET}