From efe495c87a4359b4c452a45f99d17d1a7c3a8171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur=20CB?= Date: Sun, 2 Mar 2025 11:58:48 +0100 Subject: [PATCH 1/3] allow to show every bake group, not only "linux" --- Makefile | 3 +++ README.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 517ca46ce..cfeecc8d3 100644 --- a/Makefile +++ b/Makefile @@ -51,6 +51,9 @@ every-build: check-reqs show: @$(bake_cli) linux --print +show-%: + @$(bake_cli) $* --print + list: check-reqs @set -x; make --silent show | jq -r '.target | path(.. | select(.platforms[] | contains("linux/$(ARCH)"))?) | add' diff --git a/README.md b/README.md index 02e4b7151..cc1ec8f8a 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ make every-build #### Other `make` targets -`show` gives us a detailed view of the images that will be built, with the tags, platforms, and Dockerfiles. +`show` (and `show-windows`) gives us a detailed view of the images that could be built, with all tags, platforms, and Dockerfiles. ```bash $ make show From b5b803edb19c940d5e1f46b0a7562dd46eafb163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur=20CB?= Date: Sun, 2 Mar 2025 13:47:29 +0100 Subject: [PATCH 2/3] rhel_ubi9 target building the same JDKs as the others --- docker-bake.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index e77175fc9..4f6e9ea73 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -280,7 +280,7 @@ target "debian" { target "rhel_ubi9" { matrix = { type = agent_types_to_build - jdk = [17, 21] + jdk = jdks_to_build } name = "${type}_rhel_ubi9_jdk${jdk}" target = type From f40518f147414233a7af07d1ac858424a0685f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur=20CB?= Date: Sun, 2 Mar 2025 14:45:56 +0100 Subject: [PATCH 3/3] mention the use of ON_TAG and BUILD_NUMBER --- README.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cc1ec8f8a..eb9c5cb7d 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ make every-build #### Other `make` targets -`show` (and `show-windows`) gives us a detailed view of the images that could be built, with all tags, platforms, and Dockerfiles. +`show` (and `show-windows`) gives us a detailed view of the images that could be built, with tags, platforms, and Dockerfiles. ```bash $ make show @@ -170,6 +170,36 @@ $ make show [...] ``` +To view all tags, set `ON_TAG` (and eventually `BUILD_NUMBER`): +```bash +$ ON_TAG=true BUILD_NUMBER=3 make show +[...] + "target": { + "agent_alpine_jdk17": { + "context": ".", + "dockerfile": "alpine/Dockerfile", + "args": { + "ALPINE_TAG": "3.21.3", + "JAVA_VERSION": "17.0.14_7", + "VERSION": "3283.v92c105e0f819" + }, + "tags": [ + "docker.io/jenkins/agent:3283.v92c105e0f819-3-alpine-jdk17", + "docker.io/jenkins/agent:3283.v92c105e0f819-3-alpine3.21-jdk17", + "docker.io/jenkins/agent:3283.v92c105e0f819-3-alpine", + "docker.io/jenkins/agent:3283.v92c105e0f819-3-alpine3.21", + "docker.io/jenkins/agent:alpine", + "docker.io/jenkins/agent:alpine3.21", + "docker.io/jenkins/agent:latest-alpine", + "docker.io/jenkins/agent:latest-alpine3.21", + "docker.io/jenkins/agent:alpine-jdk17", + "docker.io/jenkins/agent:alpine3.21-jdk17", + "docker.io/jenkins/agent:latest-alpine-jdk17", + "docker.io/jenkins/agent:latest-alpine3.21-jdk17" + ], + [...] +``` + `bats` is a dependency target. It will update the [`bats` submodule](https://github.com/bats-core/bats-core) and run the tests. ```bash