-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Damien Duportal <[email protected]>
- Loading branch information
Showing
5 changed files
with
75 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
title: "Bump JDK17 version" | ||
sources: | ||
JDK17Version: | ||
# Version is retrieved from the GitHub source mirror: if there is a release, then you're sure that the artifacts are available | ||
kind: githubRelease | ||
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+35(https://github.com/adoptium/temurin17-binaries/releases/tag/jdk-17%2B35) is OK | ||
pattern: "^jdk-17\\+(\\d*)$" | ||
transformers: | ||
- trimPrefix: "jdk-" | ||
# Retrieve the line defining JDK version from Packer Auto Vars. file (it's a trick to handle partial file update) | ||
packerVarJDK17CurrentLine: | ||
kind: file | ||
name: Get the current Packer Default variable for JDK17 version | ||
spec: | ||
file: .auto.pkrvars.hcl | ||
transformers: | ||
- find: 'jdk17_version.*=.*"(.*?)"' | ||
packerAutoVars: | ||
kind: file | ||
name: Get the complete packer auto vars. file content as a source | ||
depends_on: | ||
- JDK17Version | ||
- packerVarJDK17CurrentLine | ||
spec: | ||
file: .auto.pkrvars.hcl | ||
transformers: | ||
- replacer: | ||
from: '{{ source "packerVarJDK17CurrentLine" }}' | ||
to: 'jdk17_version = "{{ source "JDK17Version" }}"' | ||
targets: | ||
updateJDK17Version: | ||
name: Update the JDK17 version in the Packer default values | ||
sourceID: packerAutoVars | ||
kind: file | ||
spec: | ||
file: ".auto.pkrvars.hcl" | ||
scm: | ||
github: | ||
user: "{{ .github.user }}" | ||
email: "{{ .github.email }}" | ||
owner: "{{ .github.owner }}" | ||
repository: "{{ .github.repository }}" | ||
token: "{{ requiredEnv .github.token }}" | ||
username: "{{ .github.username }}" | ||
branch: "{{ .github.branch }}" |