-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
chore(Jeninsfile) Switch Maven commands to infra.runWithMaven #5843
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidental deletion of important git diff
call.
@jglick many thanks for your review (I learned about the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it should work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a rule, I really dislike runMaven
and think it should be deprecated. Prefer runWithMaven
+ sh 'mvn …'
for transparency. Would that suffice to solve the issues mentioned in the description?
Jenkinsfile
Outdated
runTests ? '-Dmaven.test.failure.ignore' : '-DskipTests', | ||
"-V", | ||
"-B", | ||
"-ntp", // Requires Maven >= 3.6.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently already part of runMaven
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense, it sounds like we can pass a closue block to |
The goal is to benefit from the the shared library jenkins-infra/pipeline-library that manages agents and tools. Signed-off-by: Damien Duportal <[email protected]>
@jglick @timja I've reworked the PR to use the "Replayed" Job to test the pipeline changes: https://ci.jenkins.io/job/Core/job/jenkins/job/PR-5843/18/console |
@@ -10,6 +10,8 @@ def buildNumber = BUILD_NUMBER as int; if (buildNumber > 1) milestone(buildNumbe | |||
// TEST FLAG - to make it easier to turn on/off unit tests for speeding up access to later stuff. | |||
def runTests = true | |||
def failFast = false | |||
// Same memory sizing for both builds and ATH | |||
def javaOpts = ["JAVA_OPTS=-Xmx1536m -Xms512m","MAVEN_OPTS=-Xmx1536m -Xms512m"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not directly related to this PR but is this why the tests are so darn slow. cc @basil
Locally my Jenkins core tests are soo much faster, our agents have far more resources than this =/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm that maps to the 8Gb of the container agents (rule of thumb: Xmx+Xms = 1/4 of available memory), but on the highmeme instances that could be increased. Shouldn't we remove these options and let the JVM deal with the available memory instead (I mean: even with "old" JDK8 builds", the container cgroup memory is now handled correctly without OOM)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah once we merge this I plan to try out a PR to see if it does anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I plan to ship this if it works, we can debate style later, given the master build is broken right now... |
cc @jglick when it will be daylight for you: don't hesitate to comment this PR, even if merged: I'll take care of adding a new PR with any style/feedbacks. |
The goal is to benefits from infra's JDK and maven setups per agent kind.
It avoid infamous errors
The JAVA_HOME environment variable is not defined correctly,
in the ATH and benefits the work from jenkins-infra/pipeline-library#231 abd jenkins-infra/pipeline-library#232 (not downloading JDK on each agent)Related to #5841 which "ath" step failed.
Proposed changelog entries
N.A.
Proposed upgrade guidelines
N/A
Submitter checklist
Proposed changelog entries
section only if there are breaking changes or other changes which may require extra steps from users during the upgradeDesired reviewers
@jglick @timja
Maintainer checklist
Before the changes are marked as
ready-for-merge
:Proposed changelog entries
are correctupgrade-guide-needed
label is set and there is aProposed upgrade guidelines
section in the PR title. (example)lts-candidate
to be considered (see query).