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

OAK-10613: Set Java version in Jenkinsfile to 17 (for SonarCloud) #1274

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

reschke
Copy link
Contributor

@reschke reschke commented Jan 18, 2024

No description provided.

@@ -56,7 +56,7 @@ def buildModule(moduleSpec) {
'''
timeout(70) {
checkout scm
withEnv(["Path+JDK=$JAVA_JDK_11/bin","Path+MAVEN=$MAVEN_3_LATEST/bin","JAVA_HOME=$JAVA_JDK_11","MAVEN_OPTS=-Xmx1536M"]) {
withEnv(["Path+JDK=$JAVA_JDK_17/bin","Path+MAVEN=$MAVEN_3_LATEST/bin","JAVA_HOME=$JAVA_JDK_17","MAVEN_OPTS=-Xmx1536M"]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually you want to separate checking with SonarCloud from the actual build. Look at https://github.com/apache/sling-tooling-jenkins/blob/fa79d93ce00c6f52fafaad348a04d2c0757460ed/vars/slingOsgiBundleBuild.groovy#L234C15-L234C15 or https://github.com/apache/jackrabbit-filevault-jenkins-lib/blob/7b2e2f0fce955141c1bc62ebb4a1ba36f6ba7c62/vars/vaultStageBuild.groovy#L69. That way different JDKs can be used for those.
I think building and testing with just JDK17 is probably not enough (if we state that we support building with Java11+, https://github.com/apache/jackrabbit-oak?tab=readme-ov-file#getting-started)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually SonarQube is executed by GitHub Actions not ASF Jenkins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants