From d90edf270ff3018c07b13d2fdd0a65fe4d17eb82 Mon Sep 17 00:00:00 2001 From: Jaideep <79799016+jayfranco999@users.noreply.github.com> Date: Mon, 28 Oct 2024 21:36:16 +0530 Subject: [PATCH] chore(updatecli):Track `ubuntu 22.04 AMD64` AMI ID (#1475) * 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-amd64-images.yaml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 updatecli/updatecli.d/ubuntu-22-04-amd64-images.yaml diff --git a/updatecli/updatecli.d/ubuntu-22-04-amd64-images.yaml b/updatecli/updatecli.d/ubuntu-22-04-amd64-images.yaml new file mode 100644 index 000000000..66a7b8be2 --- /dev/null +++ b/updatecli/updatecli.d/ubuntu-22-04-amd64-images.yaml @@ -0,0 +1,55 @@ +--- +name: Bump aws `ubuntu 22.04 AMD64` 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 AMD64` 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=x86_64" \ + --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 AMD64` AMI ID in locals + sourceid: lastReleaseVersion + kind: yaml + scmid: default + spec: + file: ./images-versions.yaml + key: $.aws.ubuntu.'22.04'.amd64 + +actions: + default: + kind: github/pullrequest + scmid: default + spec: + title: Bump aws `ubuntu 22.04 AMD64` AMI ID + description: "Update AWS AMI ID for Ubuntu 22.04 AMD64" + labels: + - enhancement