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 docker image digests for ubuntu 22_04 AMD64 and ubuntu 22_04 ARM64 #1508

Merged
merged 4 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 5 additions & 0 deletions images-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ aws:
"22.04":
amd64: ami-00eb69d236edcfaf8
arm64: ami-039e419d24a37cb82
docker:
ubuntu:
"22.04":
amd64: sha256:3d1556a8a18cf5307b121e0a98e93f1ddf1f3f8e092f1fddfd941254785b95d7
arm64: sha256:7c75ab2b0567edbb9d4834a2c51e462ebd709740d1f2c40bcd23c56e974fe2a8
2 changes: 1 addition & 1 deletion sources.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ source "azure-arm" "base" {

# This source defines all the common settings for any Azure image (whatever Operating System)
source "docker" "base" {
image = "${var.agent_os_type}:${var.agent_os_version}"
image = try(local.images_versions["docker"]["ubuntu"][var.agent_os_version][var.architecture], "N/A")
dduportal marked this conversation as resolved.
Show resolved Hide resolved

# Persist image on local docker engine
commit = true
Expand Down
44 changes: 44 additions & 0 deletions updatecli/updatecli.d/docker-ubuntu-22-04-amd64-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Bump docker `ubuntu 22_04 amd64` image version

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:
lastDockerDigest:
kind: dockerdigest
spec:
image: "ubuntu"
tag: "22.04"
architecture: "amd64"

targets:
updateDigest:
name: Update docker `ubuntu 22_04 amd64` image version in locals
sourceid: lastDockerDigest
kind: yaml
scmid: default
spec:
file: ./images-versions.yaml
key: $.docker.ubuntu.'22.04'.amd64
transformers:
- trimprefix: '22.04@'

actions:
default:
kind: github/pullrequest
scmid: default
spec:
title: Bump docker `ubuntu 22_04 amd64` image version
description: "Follow up docker images for ubuntu 22_04 amd64"
labels:
- enhancement
44 changes: 44 additions & 0 deletions updatecli/updatecli.d/docker-ubuntu-22-04-arm64-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Bump docker `ubuntu 22_04 arm64` image version

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:
lastDockerDigest:
kind: dockerdigest
spec:
image: "ubuntu"
tag: "22.04"
architecture: "arm64"

targets:
updateDigest:
name: Update docker `ubuntu 22_04 arm64` image version in locals
sourceid: lastDockerDigest
kind: yaml
scmid: default
spec:
file: ./images-versions.yaml
key: $.docker.ubuntu.'22.04'.arm64
transformers:
- trimprefix: '22.04@'

actions:
default:
kind: github/pullrequest
scmid: default
spec:
title: Bump docker `ubuntu 22_04 arm64` image version
description: "Follow up docker images for ubuntu 22_04 arm64"
labels:
- enhancement