Skip to content
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
130 changes: 130 additions & 0 deletions assets/code_example/docs/guides/dockerfile/updatecli.d/updatecli.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
---
name: Bump JDK17 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:
lastVersion:
kind: temurin
name: Get the latest Adoptium JDK17 version
spec:
featureversion: 17
transformers:
- trimprefix: "jdk-"

conditions:
checkTemurinAllReleases:
name: Check if the "<lastVersion>" is available for all platforms
kind: temurin
sourceid: lastVersion
spec:
featureversion: 17
platforms:
- alpine-linux/x64
- linux/x64
- linux/aarch64
- linux/ppc64le
- linux/s390x
- windows/x64

targets:
## Global config files
setJDK17VersionDockerBake:
name: "Bump JDK17 version for Linux images in the docker-bake.hcl file"
kind: hcl
transformers:
- replacer:
from: "+"
to: "_"
spec:
file: docker-bake.hcl
path: variable.JAVA17_VERSION.default
scmid: default
setJDK17VersionWindowsDockerCompose:
name: "Bump JDK17 version in build-windows.yaml"
kind: yaml
transformers:
- replacer:
from: "+"
to: "_"
spec:
files:
- build-windows.yaml
key: $.services.jdk17.build.args.JAVA_VERSION
scmid: default
## Dockerfiles
# Setting default JAVA_VERSION ARG to current Jenkins default JDK17
setJDK17VersionAlpine:
name: "Bump JDK17 version for Linux images in the Alpine Linux Dockerfile"
kind: dockerfile
transformers:
- replacer:
from: "+"
to: "_"
spec:
file: alpine/hotspot/Dockerfile
instruction:
keyword: ARG
matcher: JAVA_VERSION
scmid: default
setJDK17VersionDebian:
name: "Bump JDK17 version for Linux images in the Debian Dockerfiles"
kind: dockerfile
transformers:
- replacer:
from: "+"
to: "_"
spec:
files:
- debian/bookworm/hotspot/Dockerfile
- debian/bookworm-slim/hotspot/Dockerfile
instruction:
keyword: ARG
matcher: JAVA_VERSION
scmid: default
setJDK17VersionRhel:
name: "Bump JDK17 version for Linux images in the Rhel Dockerfile"
kind: dockerfile
transformers:
- replacer:
from: "+"
to: "_"
spec:
file: rhel/ubi9/hotspot/Dockerfile
instruction:
keyword: ARG
matcher: JAVA_VERSION
scmid: default
setJDK17VersionWindowsDockerImage:
name: "Bump default JDK17 version for Linux images in the Windows Dockerfile"
kind: dockerfile
transformers:
- replacer:
from: "+"
to: "_"
spec:
file: windows/windowsservercore/hotspot/Dockerfile
instruction:
keyword: ARG
matcher: JAVA_VERSION
scmid: default

actions:
default:
kind: github/pullrequest
scmid: default
title: Bump JDK17 version to {{ source "lastVersion" }}
spec:
labels:
- dependencies
- jdk17
8 changes: 8 additions & 0 deletions assets/code_example/docs/guides/dockerfile/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
github:
user: "GitHub Actions"
email: "41898282+github-actions[bot]@users.noreply.github.com"
username: "github-actions"
token: "UPDATECLI_GITHUB_TOKEN"
branch: "master"
owner: "jenkinsci"
repository: "docker"# Values file
Loading