Skip to content

Commit

Permalink
chore(updatecli):Track ubuntu 22.04 AMD64 AMI ID (#1475)
Browse files Browse the repository at this point in the history
* chore(updatecli):Track  AMI ID

Signed-off-by: jayfranco999 <[email protected]>

* fixup

Signed-off-by: jayfranco999 <[email protected]>

---------

Signed-off-by: jayfranco999 <[email protected]>
Co-authored-by: Damien Duportal <[email protected]>
  • Loading branch information
jayfranco999 and dduportal authored Oct 28, 2024
1 parent 0426e1e commit d90edf2
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions updatecli/updatecli.d/ubuntu-22-04-amd64-images.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d90edf2

Please sign in to comment.