From owner-dev-commits-src-all@freebsd.org Sat Sep 11 01:31:33 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A460F668BCD; Sat, 11 Sep 2021 01:31:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H5wFK4HCmz4qYv; Sat, 11 Sep 2021 01:31:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 73338172FD; Sat, 11 Sep 2021 01:31:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18B1VX1G055122; Sat, 11 Sep 2021 01:31:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18B1VX8N055121; Sat, 11 Sep 2021 01:31:33 GMT (envelope-from git) Date: Sat, 11 Sep 2021 01:31:33 GMT Message-Id: <202109110131.18B1VX8N055121@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: bfe72296190c - stable/12 - Add support for recording EC2 AMI Ids in SSM MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: bfe72296190cca25815be1823e98d560fdede061 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2021 01:31:33 -0000 The branch stable/12 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=bfe72296190cca25815be1823e98d560fdede061 commit bfe72296190cca25815be1823e98d560fdede061 Author: Colin Percival AuthorDate: 2021-08-27 00:54:53 +0000 Commit: Colin Percival CommitDate: 2021-09-11 01:31:20 +0000 Add support for recording EC2 AMI Ids in SSM If SSMPREFIX is specified, AMI Ids will be recorded in the SSM Parameter Store under the name ${SSMPREFIX}/${ARCH}/${FLAVOUR}/${ROOTFS}/${REVISION}/${BRANCH} where ARCH is "amd64" or "arm64", FLAVOUR is "base" (but may have other options in the future), ROOTFS is "ufs" (but may have other options in the future), and REVISION and BRANCH have their normal meanings. FreeBSD will be using the public prefix "/aws/service/freebsd", resulting in SSM Parameter names which look like /aws/service/freebsd/amd64/base/ufs/14.0/CURRENT Relnotes: yes Sponsored by: https://patreon.com/cperciva MFC after: 2 weeks (cherry picked from commit c5af0ac1a732491aab789dda0da368ff48497871) --- release/Makefile.ec2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/release/Makefile.ec2 b/release/Makefile.ec2 index d35f166a03d4..81d18b2c81f3 100644 --- a/release/Makefile.ec2 +++ b/release/Makefile.ec2 @@ -42,6 +42,9 @@ PUBLICSNAP= --publicsnap EC2SNSREL= ${REVISION}-${BRANCH} EC2SNSVERS= ${EC2_SVNBRANCH}@${EC2_SVNREV} .endif +.if defined(SSMPREFIX) && !empty(SSMPREFIX) +SSMOPTS= --ssm-name ${SSMPREFIX}/${TARGET_ARCH:S/aarch64/arm64/}/base/ufs/${REVISION}/${BRANCH} +.endif .if ${TARGET_ARCH} != "amd64" EC2ARCH= --${TARGET_ARCH:S/aarch64/arm64/} .endif @@ -86,7 +89,7 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} @false .endif /usr/local/bin/bsdec2-image-upload ${PUBLISH} ${PUBLICSNAP} \ - ${EC2ARCH} --sriov --ena \ + ${EC2ARCH} ${SSMOPTS} --sriov --ena \ ${.OBJDIR}/ec2.raw \ "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ "${TYPE}/${TARGET} ${EC2_SVNBRANCH}@${EC2_SVNREV}" \