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

Declare required jdk and maven as top-level pipeline tools in I-builds #1727

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

HannesWell
Copy link
Member

Since eclipse-platform/eclipse.platform.swt#973 the I-build (like the SWT build) requires a java-17 (or later) jdk on the PATH system environment-variable in order to launch a jdk>=17 with the 'java' command from the CLI. Just setting the JAVA_HOME variable to a path pointing to a jdk-17 is not sufficient since the the java executable is usually located in $JAVA_HOME/bin. And while the maven launch script searches in $JAVA_HOME/bin for a java executable to run the build itself, a simple java command on the CLI isn't that smart.
Previously running the java command would just run the default default java version on the Jenkins executor.

In general this simplifies the build-configuration because the JDK to use is only defined once and used everywhere.

Hopefully fixes #1724. I have no way to test this in advance but the explanation above is the only one I found why the Maven build itself runs fine (which requires Java-17 because of Tycho), but fails as soon as a java command is launched that requires java>=17.

Since eclipse-platform/eclipse.platform.swt#973
the I-build (like the SWT build) requires a java-17 (or later) jdk on
the PATH system environment-variable in order to launch a jdk>=17 with
the 'java' command from the CLI. Just setting the JAVA_HOME variable to
a path pointing to a jdk-17 is not sufficient since the the java
executable is usually located in '$JAVA_HOME/bin'. And while the maven
launch script searches in '$JAVA_HOME/bin' for a java executable to run
the build itself, a simple java command on the CLI isn't that smart.
Previously running the 'java' command would just run the default default
java version on the Jenkins executor.

In general this simplifies the build-configuration because the JDK to
use is only defined once and used everywhere.

Fixes eclipse-platform#1724
@akurtakov
Copy link
Member

This is step in the right direction. Please merge and start new I-build so results are seen sooner.

@HannesWell HannesWell merged commit 9e5e734 into eclipse-platform:master Jan 15, 2024
3 of 4 checks passed
@HannesWell
Copy link
Member Author

This is step in the right direction. Please merge and start new I-build so results are seen sooner.

Done. Is there anything to do to synchronize the change in the groovy file with the actual job-configuration?
If I understand it correctly https://ci.eclipse.org/releng/job/Create%20Jobs/ does that? But it failed in the last two runs?

@HannesWell HannesWell deleted the java17-in-iBuilds branch January 15, 2024 17:59
@HannesWell
Copy link
Member Author

This is step in the right direction. Please merge and start new I-build so results are seen sooner.

Done. Is there anything to do to synchronize the change in the groovy file with the actual job-configuration? If I understand it correctly https://ci.eclipse.org/releng/job/Create%20Jobs/ does that? But it failed in the last two runs?

The error was: ERROR: You must configure the DSL job to run as a specific user in order to use the Groovy sandbox.
and it happened for all timer-based executions.
The one manually started by @MohananRahul succeeded so I assumed it only works if a user explicitly triggers the job and just triggered it too. The run succeed and looking at the config of https://ci.eclipse.org/releng/job/Builds/job/I-build-4.31/ now it looks like this change was successfully applied.
I just triggered I-build-4.31#92 to verify it.

@HannesWell
Copy link
Member Author

And while the maven launch script searches in $JAVA_HOME/bin for a java executable to run the build itself, a simple java command on the CLI isn't that smart.

For the record, that behavior of Maven is mentioned in the Maven Installation Guide.

HannesWell added a commit to HannesWell/eclipse.platform.releng.aggregator that referenced this pull request Jan 16, 2024
HannesWell added a commit that referenced this pull request Jan 16, 2024
Applies the following changes to P- and Y-builds:
- #1727
- #1728
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.

4.31 I-Build: I20240114-1800 - BUILD FAILED
2 participants