From 5857607c3c8d879679930b8fea7683c6341f2aac Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Mon, 22 Apr 2024 10:36:07 -0600 Subject: [PATCH] Check for Windows JDK releases, same as Linux (#1852) * 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. --- jdk-download-url.sh | 3 +++ updatecli/updatecli.d/jdk11.yaml | 34 ++++---------------------------- updatecli/updatecli.d/jdk17.yaml | 34 ++++---------------------------- updatecli/updatecli.d/jdk21.yaml | 34 ++++---------------------------- 4 files changed, 15 insertions(+), 90 deletions(-) diff --git a/jdk-download-url.sh b/jdk-download-url.sh index bf7065be59..cd901bd88e 100755 --- a/jdk-download-url.sh +++ b/jdk-download-url.sh @@ -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="" diff --git a/updatecli/updatecli.d/jdk11.yaml b/updatecli/updatecli.d/jdk11.yaml index 62194a7196..b370bd9f9d 100644 --- a/updatecli/updatecli.d/jdk11.yaml +++ b/updatecli/updatecli.d/jdk11.yaml @@ -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:-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:-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:-jdk-nanoserver-ltsc2022" is available - disablesourceinput: true + checkTemurinWindowsRelease: + name: Check if the "" 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:-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: diff --git a/updatecli/updatecli.d/jdk17.yaml b/updatecli/updatecli.d/jdk17.yaml index ad91b7f94a..51f445b3ff 100644 --- a/updatecli/updatecli.d/jdk17.yaml +++ b/updatecli/updatecli.d/jdk17.yaml @@ -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:-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:-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:-jdk-nanoserver-ltsc2022" is available - disablesourceinput: true + checkTemurinWWindowsRelease: + name: Check if the "" 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:-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: diff --git a/updatecli/updatecli.d/jdk21.yaml b/updatecli/updatecli.d/jdk21.yaml index b4e9669e99..389f31d27e 100644 --- a/updatecli/updatecli.d/jdk21.yaml +++ b/updatecli/updatecli.d/jdk21.yaml @@ -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:-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:-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:-jdk-nanoserver-ltsc2022" is available - disablesourceinput: true + checkTemurinWindowsRelease: + name: Check if the "" 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:-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: