Skip to content

Commit

Permalink
Check for Windows JDK releases, same as Linux (jenkinsci#1852)
Browse files Browse the repository at this point in the history
* Check for Windows JDK releases, same as Linux

Returns the URL of the zip file, not the URL of the MSI file.  The Windows
container definitions do not depend on the results from this shell script,
so it is not an issue that it returns the zip file URL and not the MSI
file URL.

For example:

$ sh ./jdk-download-url.sh 21.0.3+9 windows "x64"
https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_windows_hotspot_21.0.3_9.zip

$ sh ./jdk-download-url.sh 17.0.11+9 windows "x64"
https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_x64_windows_hotspot_17.0.11_9.zip

$ sh ./jdk-download-url.sh 11.0.23+9 windows "x64"
https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.23%2B9/OpenJDK11U-jdk_x64_windows_hotspot_11.0.23_9.zip

* Simplify updatecli JDK existence check for Windows

The Windows container images no longer depend on upstream containers
from Eclipse Temurin.  We use the Eclipse Temurin Windows MSI.
  • Loading branch information
MarkEWaite committed Apr 22, 2024
1 parent 2d23c1d commit 5857607
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 90 deletions.
3 changes: 3 additions & 0 deletions jdk-download-url.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ OS_TYPE="linux"
if [ "$OS" = "alpine" ]; then
OS_TYPE="alpine-linux"
fi
if [ "$OS" = "windows" ]; then
OS_TYPE="windows"
fi

# Initialize a variable to store the URL for the first architecture
FIRST_ARCH_URL=""
Expand Down
34 changes: 4 additions & 30 deletions updatecli/updatecli.d/jdk11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,38 +44,12 @@ conditions:
spec:
command: sh ./jdk-download-url.sh '{{source "lastVersion" }}' standard "x64 aarch64 s390x"
disablesourceinput: true
checkTemurinNanoserver2019DockerImage:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-nanoserver-1809" is available
disablesourceinput: true
spec:
# architecture: amd64
image: eclipse-temurin
tag: '{{source "lastVersion" }}-jdk-nanoserver-1809'
checkTemurinWindowsCore2019DockerImage:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-windowsservercore-1809" is available
disablesourceinput: true
spec:
# architecture: amd64
image: eclipse-temurin
tag: '{{source "lastVersion" }}-jdk-windowsservercore-1809'
checkTemurinNanoserver2022DockerImage:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-nanoserver-ltsc2022" is available
disablesourceinput: true
checkTemurinWindowsRelease:
name: Check if the "<lastVersion>" is available for Windows
kind: shell
spec:
# architecture: amd64
image: eclipse-temurin
tag: '{{source "lastVersion" }}-jdk-nanoserver-ltsc2022'
checkTemurinWindowsCore2022DockerImage:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-windowsservercore-18ltsc202209" is available
command: sh ./jdk-download-url.sh '{{source "lastVersion" }}' windows "x64"
disablesourceinput: true
spec:
# architecture: amd64
image: eclipse-temurin
tag: '{{source "lastVersion" }}-jdk-windowsservercore-ltsc2022'

targets:
setJDK11VersionDockerBake:
Expand Down
34 changes: 4 additions & 30 deletions updatecli/updatecli.d/jdk17.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,38 +46,12 @@ conditions:
spec:
command: sh ./jdk-download-url.sh '{{source "lastVersion" }}' standard "x64 aarch64 s390x"
disablesourceinput: true
checkTemurinNanoserver2019DockerImage:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-nanoserver-1809" is available
disablesourceinput: true
spec:
# architecture: amd64
image: eclipse-temurin
tag: '{{source "lastVersion" }}-jdk-nanoserver-1809'
checkTemurinWindowsCore2019DockerImage:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-windowsservercore-1809" is available
disablesourceinput: true
spec:
# architecture: amd64
image: eclipse-temurin
tag: '{{source "lastVersion" }}-jdk-windowsservercore-1809'
checkTemurinNanoserver2022DockerImage:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-nanoserver-ltsc2022" is available
disablesourceinput: true
checkTemurinWWindowsRelease:
name: Check if the "<lastVersion>" is available for Windows
kind: shell
spec:
# architecture: amd64
image: eclipse-temurin
tag: '{{source "lastVersion" }}-jdk-nanoserver-ltsc2022'
checkTemurinWindowsCore2022DockerImage:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-windowsservercore-18ltsc202209" is available
command: sh ./jdk-download-url.sh '{{source "lastVersion" }}' windows "x64"
disablesourceinput: true
spec:
# architecture: amd64
image: eclipse-temurin
tag: '{{source "lastVersion" }}-jdk-windowsservercore-ltsc2022'

targets:
setJDK17VersionDockerBake:
Expand Down
34 changes: 4 additions & 30 deletions updatecli/updatecli.d/jdk21.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,38 +44,12 @@ conditions:
spec:
command: sh ./jdk-download-url.sh '{{source "lastVersion" }}' standard "x64 aarch64 s390x"
disablesourceinput: true
checkTemurinNanoserver2019DockerImage:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-nanoserver-1809" is available
disablesourceinput: true
spec:
# architecture: amd64
image: eclipse-temurin
tag: '{{source "lastVersion" }}-jdk-nanoserver-1809'
checkTemurinWindowsCore2019DockerImage:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-windowsservercore-1809" is available
disablesourceinput: true
spec:
# architecture: amd64
image: eclipse-temurin
tag: '{{source "lastVersion" }}-jdk-windowsservercore-1809'
checkTemurinNanoserver2022DockerImage:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-nanoserver-ltsc2022" is available
disablesourceinput: true
checkTemurinWindowsRelease:
name: Check if the "<lastVersion>" is available for Windows
kind: shell
spec:
# architecture: amd64
image: eclipse-temurin
tag: '{{source "lastVersion" }}-jdk-nanoserver-ltsc2022'
checkTemurinWindowsCore2022DockerImage:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-windowsservercore-18ltsc202209" is available
command: sh ./jdk-download-url.sh '{{source "lastVersion" }}' windows "x64"
disablesourceinput: true
spec:
# architecture: amd64
image: eclipse-temurin
tag: '{{source "lastVersion" }}-jdk-windowsservercore-ltsc2022'

targets:
setJDK21VersionDockerBake:
Expand Down

0 comments on commit 5857607

Please sign in to comment.