Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(updatecli):Track ubuntu 22.04 ARM64 AMI ID #1476

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions updatecli/updatecli.d/ubuntu-22-04-arm64-images.yaml
Original file line number Diff line number Diff line change
@@ -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