diff --git a/images-versions.yaml b/images-versions.yaml index f2741025b..c6d58082f 100644 --- a/images-versions.yaml +++ b/images-versions.yaml @@ -15,3 +15,8 @@ aws: "22.04": amd64: ami-00eb69d236edcfaf8 arm64: ami-039e419d24a37cb82 +docker: + ubuntu: + "22.04": + amd64: sha256:3d1556a8a18cf5307b121e0a98e93f1ddf1f3f8e092f1fddfd941254785b95d7 + arm64: sha256:7c75ab2b0567edbb9d4834a2c51e462ebd709740d1f2c40bcd23c56e974fe2a8 diff --git a/sources.pkr.hcl b/sources.pkr.hcl index d6a215a37..14de8a67b 100644 --- a/sources.pkr.hcl +++ b/sources.pkr.hcl @@ -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("${var.agent_os_type}@${local.images_versions["docker"]["ubuntu"][var.agent_os_version][var.architecture]}", "N/A") # Persist image on local docker engine commit = true diff --git a/updatecli/updatecli.d/docker-ubuntu-22-04-amd64-images.yml b/updatecli/updatecli.d/docker-ubuntu-22-04-amd64-images.yml new file mode 100644 index 000000000..6f0dcd070 --- /dev/null +++ b/updatecli/updatecli.d/docker-ubuntu-22-04-amd64-images.yml @@ -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 diff --git a/updatecli/updatecli.d/docker-ubuntu-22-04-arm64-images.yml b/updatecli/updatecli.d/docker-ubuntu-22-04-arm64-images.yml new file mode 100644 index 000000000..541885efa --- /dev/null +++ b/updatecli/updatecli.d/docker-ubuntu-22-04-arm64-images.yml @@ -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