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) fix JDK and agent manifests to ensure new versions are tracked #155

Merged
merged 3 commits into from
Apr 24, 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
48 changes: 0 additions & 48 deletions updatecli/scripts/check-jdk.sh

This file was deleted.

2 changes: 1 addition & 1 deletion updatecli/updatecli.d/weekly.d/inboundimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ sources:
name: Get the latest jenkinsci:docker-inbound-agent
spec:
owner: "jenkinsci"
repository: "docker-inbound-agent"
repository: "docker-agent"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
versionfilter:
Expand Down
14 changes: 1 addition & 13 deletions updatecli/updatecli.d/weekly.d/jdk11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,17 @@ sources:
kind: regex
# jdk-11.0.12+7(https://github.com/adoptium/temurin11-binaries/releases/tag/jdk-11.0.12%2B7) is OK
pattern: "^jdk-11.(\\d*).(\\d*).(\\d*)+(\\d*)$"
transformers:
- trimprefix: "jdk-"

conditions:
checkIfReleaseIsAvailable:
kind: shell
spec:
command: bash ./updatecli/scripts/check-jdk.sh # source input value passed as argument

targets:
updateJDK11Version:
name: Update the JDK11 version in JDK11 Maven Nanoserver image
scmid: default
kind: dockerfile
spec:
file: maven/jdk11/Dockerfile.nanoserver
instruction:
keyword: "ARG"
matcher: "JAVA_VERSION"
transformers:
- replacer:
from: +
to: _
scmid: default

actions:
default:
Expand Down
14 changes: 1 addition & 13 deletions updatecli/updatecli.d/weekly.d/jdk17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,17 @@ sources:
# 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: "^jdk-17.(\\d*).(\\d*).(\\d*)(.(\\d*))+(\\d*)$"
transformers:
- trimprefix: "jdk-"

conditions:
checkIfReleaseIsAvailable:
kind: shell
spec:
command: bash ./updatecli/scripts/check-jdk.sh # source input value passed as argument

targets:
updateJDK17Version:
name: Update the JDK17 version in the JDK17 Maven Nanoserver image
scmid: default
kind: dockerfile
spec:
file: maven/jdk17/Dockerfile.nanoserver
instruction:
keyword: "ARG"
matcher: "JAVA_VERSION"
transformers:
- replacer:
from: +
to: _
scmid: default

actions:
default:
Expand Down
50 changes: 50 additions & 0 deletions updatecli/updatecli.d/weekly.d/jdk21.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Bump JDK21 version

scms:
default:
kind: github
spec:
user: "{{ .github.user }}"
email: "{{ .github.email }}"
owner: "{{ .github.owner }}"
repository: "{{ .github.repository }}"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
branch: "{{ .github.branch }}"

sources:
lastReleaseVersion:
kind: githubrelease
name: Get the latest Adoptium JDK21 version
spec:
owner: "adoptium"
repository: "temurin21-binaries"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
versionfilter:
kind: regex
# jdk-21.0.2+8(https://github.com/adoptium/temurin21-binaries/releases/tag/jdk-21.0.2%2B8) is OK
# jdk-21.0.4.1+1(https://github.com/adoptium/temurin21-binaries/releases/tag/jdk-21.0.4.1%2B1) is OK
pattern: "^jdk-21.(\\d*).(\\d*).(\\d*)(.(\\d*))+(\\d*)$"

targets:
updateJDK21Version:
name: Update the JDK21 version in the JDK21 Maven Nanoserver image
kind: dockerfile
spec:
file: maven/jdk21/Dockerfile.nanoserver
instruction:
keyword: "ARG"
matcher: "JAVA_VERSION"
scmid: default

actions:
default:
kind: github/pullrequest
title: Bump JDK21 version to {{ source "lastReleaseVersion" }}
scmid: default
spec:
labels:
- enhancement
- jdk21
10 changes: 1 addition & 9 deletions updatecli/updatecli.d/weekly.d/jdk8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,17 @@ sources:
kind: regex
# (https://github.com/adoptium/temurin8-binaries/releases/tag/jdk8u345-b01) is OK but jdk8u302-b08.1 is not
pattern: "^jdk8u(\\d*)-b(\\d*)$"
transformers:
- trimprefix: "jdk"

conditions:
checkIfReleaseIsAvailable:
kind: shell
spec:
command: bash ./updatecli/scripts/check-jdk.sh # source input value passed as argument

targets:
updateJDK8Version:
scmid: default
name: Update the JDK8 version in the JDK8 Maven Nanoserver image
kind: dockerfile
spec:
file: maven/jdk8/Dockerfile.nanoserver
instruction:
keyword: "ARG"
matcher: "JAVA_VERSION"
scmid: default

actions:
default:
Expand Down