Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(updatecli): Uses the native temurin source. #468

Merged
merged 6 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/updatecli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v4

- name: Install Updatecli in the runner
uses: updatecli/updatecli-action@v2.70.0
uses: updatecli/updatecli-action@v2.71.0

- name: Run Updatecli in Dry Run mode
run: updatecli diff --config ./updatecli/updatecli.d --values ./updatecli/values.github-action.yaml --values ./updatecli/values.temurin.yaml
Expand Down
52 changes: 0 additions & 52 deletions updatecli/scripts/check-jdk.sh

This file was deleted.

67 changes: 25 additions & 42 deletions updatecli/updatecli.d/jdk17.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,67 +15,47 @@ scms:

sources:
jdk17LastVersion:
kind: githubrelease
kind: temurin
name: Get the latest Adoptium JDK17 version
spec:
owner: "adoptium"
repository: "temurin17-binaries"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
versionfilter:
kind: regex
# jdk-17.0.2+8(https://github.com/adoptium/temurin17-binaries/releases/tag/jdk-17.0.2%2B8) is OK
# jdk-17.0.4.1+1(https://github.com/adoptium/temurin17-binaries/releases/tag/jdk-17.0.4.1%2B1) is OK
pattern: {{ .temurin.version_pattern }}
featureversion: 17
transformers:
- trimprefix: "jdk-"
- replacer:
from: +
to: _

conditions:
checkTemurinJDK17AlpineDockerImage:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<jdk17LastVersion>-jdk-alpine" is available
transformers:
- addsuffix: "-jdk-alpine"
checkTemurinAllReleases:
name: Check if the "<lastVersion>" is available for all platforms
kind: temurin
spec:
architecture: linux/amd64
image: eclipse-temurin
checkTemurinJDK17DebianDockerImages:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<jdk17LastVersion>-jdk-focal" is available
transformers:
- addsuffix: "-jdk-focal"
spec:
architectures:
- linux/amd64
- linux/arm64
featureversion: 17
platforms:
- alpine-linux/x64
- linux/x64
- linux/aarch64
- linux/ppc64le
- linux/s390x
- linux/arm/v7
image: eclipse-temurin
checkTemurinJDK17WindowsCoreDockerImage:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<jdk17LastVersion>-jdk-windowsservercore-1809" is available
transformers:
- addsuffix: "-jdk-windowsservercore-1809"
spec:
architecture: windows/amd64
image: eclipse-temurin
- linux/arm
- windows/x64

targets:
setJDK17VersionDockerBake:
name: "Bump JDK17 version for Linux images in the docker-bake.hcl file"
kind: hcl
sourceid: jdk17LastVersion
transformers:
- replacer:
from: "+"
to: "_"
spec:
file: docker-bake.hcl
path: variable.JAVA17_VERSION.default
scmid: default
setJDK17VersionAlpine:
name: "Bump JDK17 default ARG version on Alpine Dockerfile"
kind: dockerfile
sourceid: jdk17LastVersion
transformers:
- replacer:
from: "+"
to: "_"
spec:
file: alpine/Dockerfile
instruction:
Expand All @@ -85,7 +65,10 @@ targets:
setJDK17VersionDebian:
name: "Bump JDK17 default ARG version on Debian Dockerfile"
kind: dockerfile
sourceid: jdk17LastVersion
transformers:
- replacer:
from: "+"
to: "_"
spec:
file: debian/Dockerfile
instruction:
Expand Down
52 changes: 17 additions & 35 deletions updatecli/updatecli.d/jdk21.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,55 +24,37 @@ scms:

sources:
jdk21LastVersion:
kind: temurin
name: Get the latest Adoptium JDK21 version
kind: gittag
scmid: temurin21-binaries
spec:
versionfilter:
kind: regex
pattern: '{{ .temurin.version_pattern }}'
featureversion: 21
transformers:
- trimprefix: "jdk-"
- replacer:
from: "+"
to: "_"

conditions:
checkTemurinJDK21AlpineDockerImage:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<jdk21LastVersion>-jdk-alpine" is available
transformers:
- addsuffix: "-jdk-alpine"
spec:
architectures:
- linux/amd64
- linux/arm64
image: eclipse-temurin
checkTemurinJDK21DebianDockerImages:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<jdk21LastVersion>-jdk-jammy" is available
transformers:
- addsuffix: "-jdk-jammy"
checkTemurinAllReleases:
name: Check if the "<lastTemurin21Version>" is available for all platforms
kind: temurin
spec:
architectures:
- linux/amd64
- linux/arm64
featureversion: 21
platforms:
- alpine-linux/x64
- alpine-linux/aarch64
- linux/x64
- linux/aarch64
- linux/ppc64le
- linux/s390x
image: eclipse-temurin
checkTemurinJDK21WindowsCoreDockerImage:
kind: dockerimage
name: Check if the container image "eclipse-temurin:<jdk21LastVersion>-jdk-windowsservercore-1809" is available
transformers:
- addsuffix: "-jdk-windowsservercore-1809"
spec:
architecture: windows/amd64
image: eclipse-temurin
- windows/x64

targets:
setJDK21VersionDockerBake:
name: "Bump JDK21 version for Linux images in the docker-bake.hcl file"
kind: hcl
sourceid: jdk21LastVersion
transformers:
- replacer:
from: "+"
to: "_"
spec:
file: docker-bake.hcl
path: variable.JAVA21_VERSION.default
Expand Down