diff options
| author | Thomas Wolf | 2021-01-23 19:11:45 +0000 |
|---|---|---|
| committer | Thomas Wolf | 2021-01-23 19:11:45 +0000 |
| commit | d868458b8aa75bc9a2fa96a74eeb1e77b1c0be89 (patch) | |
| tree | e7a9c946e8ed757607225d64aa7eeb1141b49be7 | |
| parent | cacfc1040914fa3da2bcb1edac5cf6e1eda12e5c (diff) | |
| download | egit-pipelines-d868458b8aa75bc9a2fa96a74eeb1e77b1c0be89.tar.gz egit-pipelines-d868458b8aa75bc9a2fa96a74eeb1e77b1c0be89.tar.xz egit-pipelines-d868458b8aa75bc9a2fa96a74eeb1e77b1c0be89.zip | |
Force a Java 1.8 JDKv0.0.5
EGit needs to be built with Java 1.8 for backwards compatibility
reasons. It shall be possible to use EGit with older Eclipse versions
before 2020-09, which didn't require Java 11.
Set the toolchain explicitly to 'adoptopenjdk-hotspot-jdk8-latest' by
default. This default can be overridden via config option config.jdk.
Bug: 570591
Change-Id: I3f8fd95782bd8d4994c7ff7295e1a7ed6b9069e2
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| -rw-r--r-- | .settings/org.eclipse.jdt.groovy.core.prefs | 3 | ||||
| -rw-r--r-- | vars/egitGithubProductBuild.groovy | 3 | ||||
| -rw-r--r-- | vars/egitGithubVerifyBuild.groovy | 1 | ||||
| -rw-r--r-- | vars/egitProductBuild.groovy | 1 | ||||
| -rw-r--r-- | vars/egitVerifyBuild.groovy | 1 | ||||
| -rw-r--r-- | vars/productBuild.groovy | 11 | ||||
| -rw-r--r-- | vars/verifyBuild.groovy | 5 |
7 files changed, 20 insertions, 5 deletions
diff --git a/.settings/org.eclipse.jdt.groovy.core.prefs b/.settings/org.eclipse.jdt.groovy.core.prefs index 74af1ba..71b5e37 100644 --- a/.settings/org.eclipse.jdt.groovy.core.prefs +++ b/.settings/org.eclipse.jdt.groovy.core.prefs @@ -1,2 +1,3 @@ eclipse.preferences.version=1 -groovy.compiler.level=25 +groovy.compiler.level=-1 +groovy.script.filters=**/*.dsld,y,**/*.gradle,n diff --git a/vars/egitGithubProductBuild.groovy b/vars/egitGithubProductBuild.groovy index f911e00..96b4bf2 100644 --- a/vars/egitGithubProductBuild.groovy +++ b/vars/egitGithubProductBuild.groovy @@ -34,7 +34,8 @@ def call(def lib, def tooling, Map cfg = [:]) { upstreamVersion: params.EGIT_VERSION, p2project : 'org.eclipse.mylyn.github-site', p2zip : 'github-updatesite-*.zip', - publishRoot : 'egit/github' + publishRoot : 'egit/github', + jdk : 'adoptopenjdk-hotspot-jdk8-latest' ] productBuild(lib, tooling, config << cfg) }
\ No newline at end of file diff --git a/vars/egitGithubVerifyBuild.groovy b/vars/egitGithubVerifyBuild.groovy index 408e6c7..c03c671 100644 --- a/vars/egitGithubVerifyBuild.groovy +++ b/vars/egitGithubVerifyBuild.groovy @@ -32,6 +32,7 @@ def call(def lib, def tooling, Map cfg = [:]) { upstreamRepo : 'egit', upstreamVersion: params.EGIT_VERSION, p2project : 'org.eclipse.mylyn.github-site', + jdk : 'adoptopenjdk-hotspot-jdk8-latest' ] verifyBuild(lib, tooling, config << cfg) }
\ No newline at end of file diff --git a/vars/egitProductBuild.groovy b/vars/egitProductBuild.groovy index c253040..d9acbf5 100644 --- a/vars/egitProductBuild.groovy +++ b/vars/egitProductBuild.groovy @@ -34,6 +34,7 @@ def call(def lib, def tooling, Map cfg = [:]) { p2project : 'org.eclipse.egit.repository', p2zip : 'org.eclipse.egit.repository-*.zip', publishRoot : 'egit', + jdk : 'adoptopenjdk-hotspot-jdk8-latest' // downstreamJob from cfg ] productBuild(lib, tooling, config << cfg) diff --git a/vars/egitVerifyBuild.groovy b/vars/egitVerifyBuild.groovy index 4b05e51..30b2ef4 100644 --- a/vars/egitVerifyBuild.groovy +++ b/vars/egitVerifyBuild.groovy @@ -32,6 +32,7 @@ def call(def lib, def tooling, Map cfg = [:]) { upstreamRepo : 'jgit', // upstreamVersion from cfg or auto-determined p2project : 'org.eclipse.egit.repository', + jdk : 'adoptopenjdk-hotspot-jdk8-latest' ] verifyBuild(lib, tooling, config << cfg) }
\ No newline at end of file diff --git a/vars/productBuild.groovy b/vars/productBuild.groovy index 64e8947..f2346ac 100644 --- a/vars/productBuild.groovy +++ b/vars/productBuild.groovy @@ -39,11 +39,16 @@ def call(def lib, def tooling, Map cfg = [:]) { // downstreamJob is optional: job to trigger after deployment ]) uiNode(config.timeOut) { - if (!env.GERRIT_BRANCH) { - env.GERRIT_BRANCH = config.defaultBranch - } try { + if (!env.GERRIT_BRANCH) { + env.GERRIT_BRANCH = config.defaultBranch + } + if (config.jdk) { + def jdk = tool name: "${config.jdk}", type: 'jdk' + env.JAVA_HOME = "${jdk}" + } stage('Checkout') { + sh '$JAVA_HOME/bin/java -version' tooling.cloneAndCheckout(config.repoPath, env.GERRIT_BRANCH, '+refs/heads/*:refs/remotes/origin/*'); } def ownVersion = lib.getOwnVersion('pom.xml') diff --git a/vars/verifyBuild.groovy b/vars/verifyBuild.groovy index e0ea924..c8f6b33 100644 --- a/vars/verifyBuild.groovy +++ b/vars/verifyBuild.groovy @@ -39,7 +39,12 @@ def call(def lib, def tooling, Map cfg = [:]) { if (!env.GERRIT_BRANCH) { env.GERRIT_BRANCH = config.defaultBranch } + if (config.jdk) { + def jdk = tool name: "${config.jdk}", type: 'jdk' + env.JAVA_HOME = "${jdk}" + } stage('Checkout') { + sh '$JAVA_HOME/bin/java -version' tooling.cloneAndCheckout(config.repoPath, env.GERRIT_BRANCH, '$GERRIT_REFSPEC', [ extensions: [ [$class: 'BuildChooserSetting', |
