Skip to content

Commit

Permalink
Update hardcoded JDK next values
Browse files Browse the repository at this point in the history
#1514

Signed-off-by: Shishir Halaharvi <[email protected]>
  • Loading branch information
ShishirH committed Mar 4, 2020
1 parent c3a77b2 commit bff31ce
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions pipelines/build/common/build_base_file.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,13 @@ class Builder implements Serializable {
if (matcher.matches()) {
return Integer.parseInt(matcher.group('version'))
} else if ("jdk".equalsIgnoreCase(javaToBuild.trim())) {
// This needs to get updated when JDK HEAD version updates
return Integer.valueOf("15")
String javaFeatureVersion = System.getenv("JAVA_FEATURE_VERSION")
if (javaFeatureVersion) {
return Integer.valueOf(javaFeatureVersion)
} else {
context.error("Environment variable JAVA_FEATURE_VERSION not set")
throw new Exception()
}
} else {
context.error("Failed to read java version '${javaToBuild}'")
throw new Exception()
Expand Down
9 changes: 7 additions & 2 deletions pipelines/build/common/openjdk_build_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,13 @@ class Build {
if (matcher.matches()) {
return Integer.parseInt(matcher.group('version'))
} else if ("jdk".equalsIgnoreCase(javaToBuild.trim())) {
// This needs to get updated when JDK HEAD version updates
return Integer.valueOf("15")
String javaFeatureVersion = System.getenv("JAVA_FEATURE_VERSION")
if (javaFeatureVersion) {
return Integer.valueOf(javaFeatureVersion)
} else {
context.error("Environment variable JAVA_FEATURE_VERSION not set")
throw new Exception()
}
} else {
context.error("Failed to read java version '${javaToBuild}'")
throw new Exception()
Expand Down

0 comments on commit bff31ce

Please sign in to comment.