@@ -25,39 +25,144 @@ val latestJava = "25" // renovate(java-version)
2525// Dockerfile name, args key passes raw arguments to docker build
2626val targets = mapOf (
2727 " jetty" to listOf (
28- ImageTarget (listOf (" 9.4.58" ), listOf (" hotspot" , " openj9" ), listOf (" 8" , " 11" , " 17" , " 21" , latestJava), mapOf (" sourceVersion" to " 9.4.58.v20250814" )),
29- ImageTarget (listOf (" 10.0.26" ), listOf (" hotspot" , " openj9" ), listOf (" 11" , " 17" , " 21" , latestJava), mapOf (" sourceVersion" to " 10.0.26" )),
30- ImageTarget (listOf (" 11.0.26" ), listOf (" hotspot" , " openj9" ), listOf (" 11" , " 17" , " 21" , latestJava), mapOf (" sourceVersion" to " 11.0.26" ), " servlet-5.0" ),
31- ImageTarget (listOf (" 12.0.28" ), listOf (" hotspot" , " openj9" ), listOf (" 17" , " 21" , latestJava), mapOf (" sourceVersion" to " 12.0.28" ), " servlet-5.0" ),
28+ ImageTarget (
29+ listOf (" 9.4.58" ),
30+ listOf (" hotspot" , " openj9" ),
31+ listOf (" 8" , " 11" , " 17" , " 21" , latestJava),
32+ mapOf (" sourceVersion" to " 9.4.58.v20250814" )
33+ ),
34+ ImageTarget (
35+ listOf (" 10.0.26" ),
36+ listOf (" hotspot" , " openj9" ),
37+ listOf (" 11" , " 17" , " 21" , latestJava),
38+ mapOf (" sourceVersion" to " 10.0.26" )
39+ ),
40+ ImageTarget (
41+ listOf (" 11.0.26" ),
42+ listOf (" hotspot" , " openj9" ),
43+ listOf (" 11" , " 17" , " 21" , latestJava),
44+ mapOf (" sourceVersion" to " 11.0.26" ),
45+ " servlet-5.0"
46+ ),
47+ ImageTarget (
48+ listOf (" 12.0.28" ),
49+ listOf (" hotspot" , " openj9" ),
50+ listOf (" 17" , " 21" , latestJava),
51+ mapOf (" sourceVersion" to " 12.0.28" ),
52+ " servlet-5.0"
53+ ),
3254 ),
3355 " liberty" to listOf (
34- ImageTarget (listOf (" 20.0.0.12" ), listOf (" hotspot" , " openj9" ), listOf (" 8" , " 11" ), mapOf (" release" to " 2020-11-11_0736" )),
35- ImageTarget (listOf (" 21.0.0.12" ), listOf (" hotspot" , " openj9" ), listOf (" 8" , " 11" , " 17" ), mapOf (" release" to " 2021-11-17_1256" )),
36- ImageTarget (listOf (" 22.0.0.12" ), listOf (" hotspot" , " openj9" ), listOf (" 8" , " 11" , " 17" ), mapOf (" release" to " 22.0.0.12" )),
37- ImageTarget (listOf (" 23.0.0.12" ), listOf (" hotspot" , " openj9" ), listOf (" 8" , " 11" , " 17" , " 21" ), mapOf (" release" to " 23.0.0.12" )),
56+ ImageTarget (
57+ listOf (" open-liberty:20.0.0.12-full-java11-openj9@sha256:2fa4af95d6c48e3db79edfd2b8a9c71e26c63a68c3fcae92f222fbb42c469ed2" ),
58+ listOf (" hotspot" , " openj9" ),
59+ listOf (" 8" , " 11" ),
60+ mapOf (" release" to " 2020-11-11_0736" )
61+ ),
62+ ImageTarget (
63+ listOf (" open-liberty:21.0.0.12-full-java11-openj9@sha256:eb014c600b5e08b799cb0c5781e606cf1e7a28ad913ba956c9d9e7f8a2f528dc" ),
64+ listOf (" hotspot" , " openj9" ),
65+ listOf (" 8" , " 11" , " 17" ),
66+ mapOf (" release" to " 2021-11-17_1256" )
67+ ),
68+ ImageTarget (
69+ listOf (" open-liberty:22.0.0.12-full-java11-openj9@sha256:a06f1da35a564f00354b86c7d01d8cc9d6eef156ce88d5b59605c5c02bf48c72" ),
70+ listOf (" hotspot" , " openj9" ),
71+ listOf (" 8" , " 11" , " 17" ),
72+ mapOf (" release" to " 22.0.0.12" )
73+ ),
74+ ImageTarget (
75+ listOf (" open-liberty:23.0.0.12-full-java11-openj9@sha256:cd6aa69cffffb45427cbb6a5640cd00b13c98064f296a66894ea1decd181e1c3" ),
76+ listOf (" hotspot" , " openj9" ),
77+ listOf (" 8" , " 11" , " 17" , " 21" ),
78+ mapOf (" release" to " 23.0.0.12" )
79+ ),
3880 ),
3981 " payara" to listOf (
40- ImageTarget (listOf (" 5.2020.6" , " 5.2021.8" ), listOf (" hotspot" , " openj9" ), listOf (" 8" , " 11" )),
82+ ImageTarget (
83+ listOf (
84+ " payara/server-full:5.2020.6@sha256:8c8f054ecbfb340b60961d7ffea2d223cea1afe6183f6986f4806de5c0bc9419" ,
85+ " payara/server-full:5.2021.8@sha256:ffc915a7243b27504c13c4bd4adb3da55c6c08a93ac05685afea3ea77380109d"
86+ ),
87+ listOf (" hotspot" , " openj9" ),
88+ listOf (" 8" , " 11" )
89+ ),
4190 // Test application is not deployed when server is sarted with hotspot jdk version 21
42- ImageTarget (listOf (" 6.2023.12" ), listOf (" hotspot" ), listOf (" 11" , " 17" ), war = " servlet-5.0" ),
43- ImageTarget (listOf (" 6.2023.12" ), listOf (" openj9" ), listOf (" 11" , " 17" , " 21" ), war = " servlet-5.0" )
91+ ImageTarget (
92+ listOf (" payara/server-full:6.2023.12@sha256:5c382db1f5bad8bef693dbcd0fed299844690839f4894e07c248de5f4b186b9b" ),
93+ listOf (" hotspot" ),
94+ listOf (" 11" , " 17" ),
95+ war = " servlet-5.0"
96+ ),
97+ ImageTarget (
98+ listOf (" payara/server-full:6.2023.12@sha256:5c382db1f5bad8bef693dbcd0fed299844690839f4894e07c248de5f4b186b9b" ),
99+ listOf (" openj9" ),
100+ listOf (" 11" , " 17" , " 21" ),
101+ war = " servlet-5.0"
102+ )
44103 ),
45104 " tomcat" to listOf (
46- ImageTarget (listOf (" 7.0.109" ), listOf (" hotspot" , " openj9" ), listOf (" 8" ), mapOf (" majorVersion" to " 7" )),
47- ImageTarget (listOf (" 8.5.98" ), listOf (" hotspot" , " openj9" ), listOf (" 8" , " 11" , " 17" , " 21" , latestJava), mapOf (" majorVersion" to " 8" )),
48- ImageTarget (listOf (" 9.0.111" ), listOf (" hotspot" , " openj9" ), listOf (" 8" , " 11" , " 17" , " 21" , latestJava), mapOf (" majorVersion" to " 9" )),
49- ImageTarget (listOf (" 10.1.48" ), listOf (" hotspot" , " openj9" ), listOf (" 11" , " 17" , " 21" , latestJava), mapOf (" majorVersion" to " 10" ), " servlet-5.0" ),
105+ ImageTarget (
106+ listOf (" 7.0.109" ),
107+ listOf (" hotspot" , " openj9" ),
108+ listOf (" 8" ),
109+ mapOf (" majorVersion" to " 7" )
110+ ),
111+ ImageTarget (
112+ listOf (" 8.5.98" ),
113+ listOf (" hotspot" , " openj9" ),
114+ listOf (" 8" , " 11" , " 17" , " 21" , latestJava),
115+ mapOf (" majorVersion" to " 8" )
116+ ),
117+ ImageTarget (
118+ listOf (" 9.0.111" ),
119+ listOf (" hotspot" , " openj9" ),
120+ listOf (" 8" , " 11" , " 17" , " 21" , latestJava),
121+ mapOf (" majorVersion" to " 9" )
122+ ),
123+ ImageTarget (
124+ listOf (" 10.1.48" ),
125+ listOf (" hotspot" , " openj9" ),
126+ listOf (" 11" , " 17" , " 21" , latestJava),
127+ mapOf (" majorVersion" to " 10" ),
128+ " servlet-5.0"
129+ ),
50130 ),
51131 " tomee" to listOf (
52- ImageTarget (listOf (" 7.0.9" , " 7.1.4" ), listOf (" hotspot" , " openj9" ), listOf (" 8" )),
53- ImageTarget (listOf (" 8.0.16" ), listOf (" hotspot" , " openj9" ), listOf (" 8" , " 11" , " 17" , " 21" , latestJava)),
54- ImageTarget (listOf (" 9.1.3" ), listOf (" hotspot" , " openj9" ), listOf (" 11" , " 17" , " 21" , latestJava), war = " servlet-5.0" ),
132+ ImageTarget (
133+ listOf (" 7.0.9" , " 7.1.4" ),
134+ listOf (" hotspot" , " openj9" ),
135+ listOf (" 8" )
136+ ),
137+ ImageTarget (
138+ listOf (" 8.0.16" ),
139+ listOf (" hotspot" , " openj9" ),
140+ listOf (" 8" , " 11" , " 17" , " 21" , latestJava)
141+ ),
142+ ImageTarget (
143+ listOf (" 9.1.3" ),
144+ listOf (" hotspot" , " openj9" ),
145+ listOf (" 11" , " 17" , " 21" , latestJava),
146+ war = " servlet-5.0"
147+ ),
55148 ),
56149 " websphere" to listOf (
57- ImageTarget (listOf (" 8.5.5.22" , " 9.0.5.14" ), listOf (" openj9" ), listOf (" 8" ), windows = false ),
150+ ImageTarget (
151+ listOf (
152+ " ibmcom/websphere-traditional:8.5.5.22@sha256:2a385c56f3e6781cc595d873473efd5ef7cb4f34e88c6cf8381121332fb49c9c" ,
153+ " ibmcom/websphere-traditional:9.0.5.14@sha256:7e569af2f4050bb0f3ac0fcab113e2dee20d9d6bdc4061cef4b97b79c2ea4fdd"
154+ ),
155+ listOf (" openj9" ),
156+ listOf (" 8" ),
157+ windows = false
158+ ),
58159 ),
59160 " wildfly" to listOf (
60- ImageTarget (listOf (" 13.0.0.Final" ), listOf (" hotspot" , " openj9" ), listOf (" 8" )),
161+ ImageTarget (
162+ listOf (" 13.0.0.Final" ),
163+ listOf (" hotspot" , " openj9" ),
164+ listOf (" 8" )
165+ ),
61166 ImageTarget (
62167 listOf (" 17.0.1.Final" , " 21.0.0.Final" ),
63168 listOf (" hotspot" , " openj9" ),
@@ -127,13 +232,30 @@ fun configureImage(
127232 parentTask : TaskProvider <out Task >,
128233 server : String ,
129234 dockerfile : String ,
130- version : String ,
235+ fullVersion : String ,
131236 vm : String ,
132237 jdk : String ,
133238 warProject : String ,
134239 args : Map <String , String >,
135240 isWindows : Boolean
136241): String {
242+ val versionParts = fullVersion.split(" @" )
243+ val imageNameWithTag = versionParts[0 ]
244+ val serverImageHash = if (versionParts.size > 1 ) versionParts[1 ].removePrefix(" sha256:" ) else " "
245+
246+ // Extract just the version (tag) from the full image reference
247+ var version = if (imageNameWithTag.contains(" :" )) {
248+ imageNameWithTag.substringAfterLast(" :" )
249+ } else {
250+ imageNameWithTag
251+ }
252+
253+ // Extract just the version number from tags with suffixes
254+ // (e.g., "20.0.0.12" from "20.0.0.12-full-java11-openj9")
255+ if (version.contains(" -" )) {
256+ version = version.substringBefore(" -" )
257+ }
258+
137259 // Using separate build directory for different image
138260 val dockerWorkingDir = layout.buildDirectory.dir(" docker-$server -$version -jdk$jdk -$vm -$warProject " )
139261 val dockerFileName = " $dockerfile .${if (isWindows) " windows." else " " } dockerfile"
@@ -203,6 +325,12 @@ fun configureImage(
203325 val jdkImageHash = if (jdkImageParts.size > 1 ) jdkImageParts[1 ].removePrefix(" sha256:" ) else " "
204326
205327 val extraArgs = args.toMutableMap()
328+
329+ // Pass the full image name with tag (for servers that need it)
330+ if (imageNameWithTag.contains(" :" )) {
331+ extraArgs[" imageName" ] = imageNameWithTag
332+ }
333+
206334 if (server == " wildfly" ) {
207335 // wildfly url without .zip or .tar.gz suffix
208336 val majorVersion = version.substring(0 , version.indexOf(" ." )).toInt()
@@ -228,7 +356,7 @@ fun configureImage(
228356 inputDir.set(dockerWorkingDir)
229357 images.add(image)
230358 dockerFile.set(File (dockerWorkingDir.get().asFile, dockerFileName))
231- buildArgs.set(extraArgs + mapOf (" jdk" to jdk, " vm" to vm, " version" to version, " jdkImageName" to jdkImageName, " jdkImageHash" to jdkImageHash))
359+ buildArgs.set(extraArgs + mapOf (" jdk" to jdk, " vm" to vm, " version" to version, " jdkImageName" to jdkImageName, " jdkImageHash" to jdkImageHash, " imageHash " to serverImageHash ))
232360 doLast {
233361 matrix.add(image)
234362 }
0 commit comments