Skip to content

Commit

Permalink
Merge pull request #945 from lemeurherveCB/extract-from-944
Browse files Browse the repository at this point in the history
chore: add `show-%` Makefile target and use `jdks_to_build` in `rhel_ubi9` bake target
  • Loading branch information
dduportal authored Mar 5, 2025
2 parents f758346 + f40518f commit 8364471
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 tags, platforms, and Dockerfiles.

```bash
$ make show
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,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
Expand Down

0 comments on commit 8364471

Please sign in to comment.