Skip to content

Commit

Permalink
chore(updatecli): adapt manifests to unique Dockerfile per Linux vari…
Browse files Browse the repository at this point in the history
  • Loading branch information
lemeurherve committed May 7, 2024
1 parent c9e1310 commit c70d445
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 259 deletions.
58 changes: 11 additions & 47 deletions updatecli/updatecli.d/alpine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,12 @@ sources:
- trimprefix: "v"

conditions:
testDockerfileArgJDK11:
name: "Does the JDK11 Dockerfile have an ARG instruction for the Alpine Linux version?"
testDockerfileArg:
name: "Does the Dockerfile have an ARG instruction for the Alpine Linux version?"
kind: dockerfile
disablesourceinput: true
spec:
file: 11/alpine/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "ALPINE_TAG"
testDockerfileArgJDK17:
name: "Does the JDK17 Dockerfile have an ARG instruction for the Alpine Linux version?"
kind: dockerfile
disablesourceinput: true
spec:
file: 17/alpine/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "ALPINE_TAG"
testDockerfileArgJDK21:
name: "Does the JDK21 Dockerfile have an ARG instruction for the Alpine Linux version?"
kind: dockerfile
disablesourceinput: true
spec:
file: 21/alpine/hotspot/Dockerfile
file: alpine/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "ALPINE_TAG"
Expand All @@ -66,40 +48,22 @@ conditions:
architecture: amd64

targets:
updateDockerfileJDK11:
name: "Update the value of the JDK11 base image (ARG ALPINE_TAG) in the Dockerfile"
kind: dockerfile
updateDockerBake:
name: "Update the value of the base image (ARG ALPINE_TAG) in the docker-bake.hcl"
kind: hcl
spec:
file: 11/alpine/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "ALPINE_TAG"
file: docker-bake.hcl
path: variable.ALPINE_FULL_TAG.default
scmid: default
updateDockerfileJDK17:
name: "Update the value of the JDK17 base image (ARG ALPINE_TAG) in the Dockerfile"
kind: dockerfile
spec:
file: 17/alpine/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "ALPINE_TAG"
scmid: default
updateDockerfileJDK21:
name: "Update the value of the JDK21 base image (ARG ALPINE_TAG) in the Dockerfile"
updateDockerfile:
name: "Update the value of the JDK base image (ARG ALPINE_TAG) in the Dockerfile"
kind: dockerfile
spec:
file: 21/alpine/hotspot/Dockerfile
file: alpine/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "ALPINE_TAG"
scmid: default
updateDockerBake:
name: "Update the value of the base image (ARG ALPINE_TAG) in the docker-bake.hcl"
kind: hcl
spec:
file: docker-bake.hcl
path: variable.ALPINE_FULL_TAG.default
scmid: default
actions:
default:
kind: github/pullrequest
Expand Down
137 changes: 17 additions & 120 deletions updatecli/updatecli.d/debian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,71 +26,16 @@ sources:
kind: regex
pattern: >-
bookworm-\d+$
bookwormSlimLatestVersion:
kind: dockerimage
name: "Get the latest Debian Bookworm Linux version"
transformers:
- trimprefix: "bookworm-"
spec:
image: "debian"
tagfilter: "bookworm-*"
versionfilter:
kind: regex
pattern: >-
bookworm-\d+-slim$
conditions:
testDockerfileArgJDK11:
name: "Does the Dockerfile have an ARG instruction for the Debian Bookworm Linux version?"
testDockerfileArg:
name: "Does the Dockerfile have an ARG instruction for the Debian Bookworm & Bookworm Slim Linux version?"
kind: dockerfile
disablesourceinput: true
spec:
file: 11/debian/bookworm/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "BOOKWORM_TAG"
testDockerfileArgJDK11Slim:
name: "Does the Dockerfile have an ARG instruction for the Debian Bookworm Linux version?"
kind: dockerfile
disablesourceinput: true
spec:
file: 11/debian/bookworm-slim/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "BOOKWORM_TAG"
testDockerfileArgJDK17:
name: "Does the Dockerfile have an ARG instruction for the Debian Bookworm Linux version?"
kind: dockerfile
disablesourceinput: true
spec:
file: 17/debian/bookworm/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "BOOKWORM_TAG"
testDockerfileArgJDK17Slim:
name: "Does the Dockerfile have an ARG instruction for the Debian Bookworm Linux version?"
kind: dockerfile
disablesourceinput: true
spec:
file: 17/debian/bookworm-slim/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "BOOKWORM_TAG"
testDockerfileArgJDK21:
name: "Does the Dockerfile have an ARG instruction for the Debian Bookworm Linux version?"
kind: dockerfile
disablesourceinput: true
spec:
file: 21/debian/bookworm/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "BOOKWORM_TAG"
testDockerfileArgJDK21Slim:
name: "Does the Dockerfile have an ARG instruction for the Debian Bookworm Linux version?"
kind: dockerfile
disablesourceinput: true
spec:
file: 21/debian/bookworm-slim/hotspot/Dockerfile
files:
- debian/bookworm/hotspot/Dockerfile
- debian/bookworm-slim/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "BOOKWORM_TAG"
Expand All @@ -103,66 +48,6 @@ conditions:
matchpattern: "(.*BOOKWORM_TAG.*)"

targets:
updateDockerfileJDK11:
name: "Update the value of the base image (ARG BOOKWORM_TAG) in the Dockerfile"
kind: dockerfile
sourceid: bookwormLatestVersion
spec:
file: 11/debian/bookworm/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "BOOKWORM_TAG"
scmid: default
updateDockerfileJDK11Slim:
name: "Update the value of the base image (ARG BOOKWORM_TAG) in the Dockerfile"
kind: dockerfile
sourceid: bookwormLatestVersion
spec:
file: 11/debian/bookworm-slim/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "BOOKWORM_TAG"
scmid: default
updateDockerfileJDK17:
name: "Update the value of the base image (ARG BOOKWORM_TAG) in the Dockerfile"
kind: dockerfile
sourceid: bookwormLatestVersion
spec:
file: 17/debian/bookworm/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "BOOKWORM_TAG"
scmid: default
updateDockerfileJDK17Slim:
name: "Update the value of the base image (ARG BOOKWORM_TAG) in the Dockerfile"
kind: dockerfile
sourceid: bookwormLatestVersion
spec:
file: 17/debian/bookworm-slim/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "BOOKWORM_TAG"
scmid: default
updateDockerfileJDK21:
name: "Update the value of the base image (ARG BOOKWORM_TAG) in the Dockerfile"
kind: dockerfile
sourceid: bookwormLatestVersion
spec:
file: 21/debian/bookworm/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "BOOKWORM_TAG"
scmid: default
updateDockerfileJDK21Slim:
name: "Update the value of the base image (ARG BOOKWORM_TAG) in the Dockerfile"
kind: dockerfile
sourceid: bookwormLatestVersion
spec:
file: 21/debian/bookworm-slim/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "BOOKWORM_TAG"
scmid: default
updateDockerBake:
name: "Update the value of the base image (ARG BOOKWORM_TAG) in the docker-bake.hcl"
kind: file
Expand All @@ -174,6 +59,18 @@ targets:
replacepattern: >-
variable${1}"BOOKWORM_TAG"${2}{${3}${4}${5}default${6}= "{{ source "bookwormLatestVersion" }}"
scmid: default
updateDockerfile:
name: "Update the value of the base image (ARG BOOKWORM_TAG) in the Dockerfiles"
kind: dockerfile
sourceid: bookwormLatestVersion
spec:
files:
- debian/bookworm/hotspot/Dockerfile
- debian/bookworm-slim/hotspot/Dockerfile
instruction:
keyword: "ARG"
matcher: "BOOKWORM_TAG"
scmid: default
actions:
default:
kind: github/pullrequest
Expand Down
48 changes: 12 additions & 36 deletions updatecli/updatecli.d/jdk11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,45 +52,28 @@ conditions:
disablesourceinput: true

targets:
## Global config files
setJDK11VersionDockerBake:
name: "Bump JDK11 version for Linux images in the docker-bake.hcl file"
kind: hcl
spec:
file: docker-bake.hcl
path: variable.JAVA11_VERSION.default
scmid: default
setJDK11VersionAlmaLinux8:
name: "Bump JDK11 version for Linux images in the Alma Linux 8 Dockerfile"
kind: dockerfile
spec:
file: 11/almalinux/almalinux8/hotspot/Dockerfile
instruction:
keyword: ARG
matcher: JAVA_VERSION
scmid: default
setJDK11VersionAlpine:
name: "Bump JDK11 version for Linux images in the Alpine Linux Dockerfile"
kind: dockerfile
spec:
file: 11/alpine/hotspot/Dockerfile
instruction:
keyword: ARG
matcher: JAVA_VERSION
scmid: default
setJDK11VersionDebian:
name: "Bump JDK11 version for Linux images in the Debian Dockerfile"
kind: dockerfile
setJDK11VersionWindowsDockerCompose:
name: "Bump JDK11 version in build-windows.yaml"
kind: yaml
spec:
file: 11/debian/bookworm/hotspot/Dockerfile
instruction:
keyword: ARG
matcher: JAVA_VERSION
file: build-windows.yaml
key: $.services.jdk11.build.args.JAVA_VERSION
scmid: default
setJDK11VersionDebianSlim:
name: "Bump JDK11 version for Linux images in the Debian Slim Dockerfile"
## Dockerfiles
# Setting default JAVA_VERSION ARG for remaining ad hoc JDK11 images
setJDK11VersionAlmaLinux8:
name: "Bump JDK11 version for Linux images in the Alma Linux 8 Dockerfile"
kind: dockerfile
spec:
file: 11/debian/bookworm-slim/hotspot/Dockerfile
file: almalinux/almalinux8/hotspot/Dockerfile
instruction:
keyword: ARG
matcher: JAVA_VERSION
Expand All @@ -99,18 +82,11 @@ targets:
name: "Bump JDK11 version for Linux images in the Rhel Dockerfile"
kind: dockerfile
spec:
file: 11/rhel/ubi8/hotspot/Dockerfile
file: rhel/ubi8/hotspot/Dockerfile
instruction:
keyword: ARG
matcher: JAVA_VERSION
scmid: default
setJDK11VersionWindowsDockerCompose:
name: "Bump JDK11 version in build-windows.yaml"
kind: yaml
spec:
file: build-windows.yaml
key: $.services.jdk11.build.args.JAVA_VERSION
scmid: default

actions:
default:
Expand Down
36 changes: 16 additions & 20 deletions updatecli/updatecli.d/jdk17.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,36 +54,39 @@ conditions:
disablesourceinput: true

targets:
## Global config files
setJDK17VersionDockerBake:
name: "Bump JDK17 version for Linux images in the docker-bake.hcl file"
kind: hcl
spec:
file: docker-bake.hcl
path: variable.JAVA17_VERSION.default
scmid: default
setJDK17VersionWindowsDockerCompose:
name: "Bump JDK17 version in build-windows.yaml"
kind: yaml
spec:
file: build-windows.yaml
key: $.services.jdk17.build.args.JAVA_VERSION
scmid: default
## Dockerfiles
# Setting default JAVA_VERSION ARG to current Jenkins default JDK17
setJDK17VersionAlpine:
name: "Bump JDK17 version for Linux images in the Alpine Linux Dockerfile"
kind: dockerfile
spec:
file: 17/alpine/hotspot/Dockerfile
file: alpine/hotspot/Dockerfile
instruction:
keyword: ARG
matcher: JAVA_VERSION
scmid: default
setJDK17VersionDebian:
name: "Bump JDK17 version for Linux images in the Debian Dockerfile"
kind: dockerfile
spec:
file: 17/debian/bookworm/hotspot/Dockerfile
instruction:
keyword: ARG
matcher: JAVA_VERSION
scmid: default
setJDK17VersionDebianSlim:
name: "Bump JDK17 version for Linux images in the Debian Slim Dockerfile"
name: "Bump JDK17 version for Linux images in the Debian Dockerfiles"
kind: dockerfile
spec:
file: 17/debian/bookworm-slim/hotspot/Dockerfile
files:
- debian/bookworm/hotspot/Dockerfile
- debian/bookworm-slim/hotspot/Dockerfile
instruction:
keyword: ARG
matcher: JAVA_VERSION
Expand All @@ -92,7 +95,7 @@ targets:
name: "Bump JDK17 version for Linux images in the Rhel Dockerfile"
kind: dockerfile
spec:
file: 17/rhel/ubi9/hotspot/Dockerfile
file: rhel/ubi9/hotspot/Dockerfile
instruction:
keyword: ARG
matcher: JAVA_VERSION
Expand All @@ -106,13 +109,6 @@ targets:
keyword: ARG
matcher: JAVA_VERSION
scmid: default
setJDK17VersionWindowsDockerCompose:
name: "Bump JDK17 version in build-windows.yaml"
kind: yaml
spec:
file: build-windows.yaml
key: $.services.jdk17.build.args.JAVA_VERSION
scmid: default

actions:
default:
Expand Down
Loading

0 comments on commit c70d445

Please sign in to comment.