From cc2798432a6886ffe4d40d93bc5b6f1db9436c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur=20CB?= Date: Tue, 24 Sep 2024 18:06:43 +0200 Subject: [PATCH 1/2] chore: follow-up of UBI9 image introduction --- README.md | 20 +++++++++- docker-bake.hcl | 19 +++++++--- updatecli/updatecli.d/rhel-ubi9.yaml | 55 ++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 7 deletions(-) create mode 100644 updatecli/updatecli.d/rhel-ubi9.yaml diff --git a/README.md b/README.md index 6c219f36c..5986037ec 100644 --- a/README.md +++ b/README.md @@ -30,14 +30,23 @@ If you want to see the target images (matching your current architecture) that w ```bash $ make list +agent_alpine_jdk11 +agent_alpine_jdk17 agent_alpine_jdk21 +agent_archlinux_jdk11 agent_debian_jdk11 agent_debian_jdk17 agent_debian_jdk21 +agent_rhel_ubi9_jdk17 +agent_rhel_ubi9_jdk21 +inbound-agent_alpine_jdk11 +inbound-agent_alpine_jdk17 inbound-agent_alpine_jdk21 inbound-agent_debian_jdk11 inbound-agent_debian_jdk17 inbound-agent_debian_jdk21 +inbound-agent_rhel_ubi9_jdk17 +inbound-agent_rhel_ubi9_jdk21 ``` #### Building a specific image @@ -128,7 +137,16 @@ $ make show "targets": [ "agent_archlinux_jdk11", "alpine", - "debian" + "debian", + "rhel_ubi9" + ] + }, + "rhel_ubi9": { + "targets": [ + "agent_rhel_ubi9_jdk17", + "agent_rhel_ubi9_jdk21", + "inbound-agent_rhel_ubi9_jdk17", + "inbound-agent_rhel_ubi9_jdk21" ] } }, diff --git a/docker-bake.hcl b/docker-bake.hcl index 99c428ec1..fd953ca71 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -2,7 +2,8 @@ group "linux" { targets = [ "agent_archlinux_jdk11", "alpine", - "debian" + "debian", + "rhel_ubi9" ] } @@ -21,7 +22,9 @@ group "linux-agent-only" { "agent_alpine_jdk21", "agent_debian_jdk11", "agent_debian_jdk17", - "agent_debian_jdk21" + "agent_debian_jdk21", + "agent_rhel_ubi9_jdk17", + "agent_rhel_ubi9_jdk21" ] } @@ -32,14 +35,17 @@ group "linux-inbound-agent-only" { "inbound-agent_alpine_jdk21", "inbound-agent_debian_jdk11", "inbound-agent_debian_jdk17", - "inbound-agent_debian_jdk21" + "inbound-agent_debian_jdk21", + "inbound-agent_rhel_ubi9_jdk17", + "inbound-agent_rhel_ubi9_jdk21" ] } group "linux-arm64" { targets = [ - "debian", "alpine_jdk21", + "debian", + "rhel_ubi9" ] } @@ -59,7 +65,8 @@ group "linux-s390x" { group "linux-ppc64le" { targets = [ - "debian" + "debian", + "rhel_ubi9" ] } @@ -306,7 +313,7 @@ target "agent_archlinux_jdk11" { target "rhel_ubi9" { matrix = { - type = ["agent", "inbound-agent"] + type = agent_types_to_build jdk = [17, 21] } name = "${type}_rhel_ubi9_jdk${jdk}" diff --git a/updatecli/updatecli.d/rhel-ubi9.yaml b/updatecli/updatecli.d/rhel-ubi9.yaml new file mode 100644 index 000000000..782c29a89 --- /dev/null +++ b/updatecli/updatecli.d/rhel-ubi9.yaml @@ -0,0 +1,55 @@ +--- +name: Bump UBI9 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: + latestVersion: + kind: dockerimage + name: "Get the latest UBI9 Linux version" + spec: + image: "registry.access.redhat.com/ubi9/ubi" + versionfilter: + kind: semver + transformers: + - trimsuffix: "-source" + +targets: + updateDockerfile: + name: "Update the value of the base image (ARG UBI9_TAG) in the Dockerfile" + kind: dockerfile + sourceid: latestVersion + spec: + file: rhel/ubi9/Dockerfile + instruction: + keyword: "ARG" + matcher: "UBI9_TAG" + scmid: default + updateDockerBake: + name: "Update the default value of the variable UBI9_TAG in the docker-bake.hcl" + kind: hcl + sourceid: latestVersion + spec: + file: docker-bake.hcl + path: variable.UBI9_TAG.default + scmid: default + +actions: + default: + kind: github/pullrequest + scmid: default + title: Bump UBI9 version to {{ source "latestVersion" }} + spec: + labels: + - dependencies + - rhel-ubi9 From ea742576977655f45756b82bd50d10569397f862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur=20CB?= Date: Tue, 24 Sep 2024 18:38:14 +0200 Subject: [PATCH 2/2] remove rhel-ubi9 updatecli manifest for now as it try to replace the existing tag by the '9.4' one :facepalm: --- updatecli/updatecli.d/rhel-ubi9.yaml | 55 ---------------------------- 1 file changed, 55 deletions(-) delete mode 100644 updatecli/updatecli.d/rhel-ubi9.yaml diff --git a/updatecli/updatecli.d/rhel-ubi9.yaml b/updatecli/updatecli.d/rhel-ubi9.yaml deleted file mode 100644 index 782c29a89..000000000 --- a/updatecli/updatecli.d/rhel-ubi9.yaml +++ /dev/null @@ -1,55 +0,0 @@ ---- -name: Bump UBI9 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: - latestVersion: - kind: dockerimage - name: "Get the latest UBI9 Linux version" - spec: - image: "registry.access.redhat.com/ubi9/ubi" - versionfilter: - kind: semver - transformers: - - trimsuffix: "-source" - -targets: - updateDockerfile: - name: "Update the value of the base image (ARG UBI9_TAG) in the Dockerfile" - kind: dockerfile - sourceid: latestVersion - spec: - file: rhel/ubi9/Dockerfile - instruction: - keyword: "ARG" - matcher: "UBI9_TAG" - scmid: default - updateDockerBake: - name: "Update the default value of the variable UBI9_TAG in the docker-bake.hcl" - kind: hcl - sourceid: latestVersion - spec: - file: docker-bake.hcl - path: variable.UBI9_TAG.default - scmid: default - -actions: - default: - kind: github/pullrequest - scmid: default - title: Bump UBI9 version to {{ source "latestVersion" }} - spec: - labels: - - dependencies - - rhel-ubi9