From 438affde01a5f716065153428e82fca356438d6f Mon Sep 17 00:00:00 2001 From: Jaideep <79799016+jayfranco999@users.noreply.github.com> Date: Mon, 28 Oct 2024 21:44:19 +0530 Subject: [PATCH] chore(updatecli):Track `ubuntu 22.04 ARM64` AMI ID (#1476) * chore(updatecli):Track AMI ID Signed-off-by: jayfranco999 * fixup Signed-off-by: jayfranco999 --------- Signed-off-by: jayfranco999 Co-authored-by: Damien Duportal --- .../ubuntu-22-04-arm64-images.yaml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 updatecli/updatecli.d/ubuntu-22-04-arm64-images.yaml diff --git a/updatecli/updatecli.d/ubuntu-22-04-arm64-images.yaml b/updatecli/updatecli.d/ubuntu-22-04-arm64-images.yaml new file mode 100644 index 000000000..a91128143 --- /dev/null +++ b/updatecli/updatecli.d/ubuntu-22-04-arm64-images.yaml @@ -0,0 +1,55 @@ +--- +name: Bump aws `ubuntu 22.04 ARM64` AMI ID + +scms: + default: + kind: github + spec: + user: "{{ .github.user }}" + email: "{{ .github.email }}" + owner: "{{ .github.owner }}" + repository: "{{ .github.repository }}" + token: "{{ requiredEnv .github.token }}" + username: "{{ .github.username }}" + branch: "{{ .github.branch }}" + +sources: + lastReleaseVersion: + kind: shell + name: Get the latest `ubuntu 22.04 ARM64` AMI ID + spec: + command: > + aws ec2 describe-images \ + --owners 099720109477 \ + --filters \ + "Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-*-22.04-*-server-*" \ + "Name=root-device-type,Values=ebs" \ + "Name=virtualization-type,Values=hvm" \ + "Name=architecture,Values=arm64" \ + --query 'sort_by(Images, &CreationDate)[-1].ImageId' \ + --region us-east-2 \ + --output text + environments: + - name: PATH + - name: AWS_ACCESS_KEY_ID + - name: AWS_SECRET_ACCESS_KEY + +targets: + updateVersion: + name: Update aws `ubuntu 22.04 ARM64` AMI ID in locals + sourceid: lastReleaseVersion + kind: yaml + scmid: default + spec: + file: ./images-versions.yaml + key: $.aws.ubuntu.'22.04'.arm64 + +actions: + default: + kind: github/pullrequest + scmid: default + spec: + title: Bump aws `ubuntu 22.04 ARM64` AMI ID + description: "Update AWS AMI ID for Ubuntu 22.04 ARM64" + labels: + - enhancement