-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Add a new infra.prepareToPublishIncrementals()
method to optimize the resource usage
#111
Add a new infra.prepareToPublishIncrementals()
method to optimize the resource usage
#111
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.
Makes sense to me, but I'm not familiar with this file and how it's used.
*/ | ||
void prepareToPublishIncrementals() { | ||
// MINSTALL-126 would make this easier by letting us publish to a different directory to begin with: | ||
String m2repo = sh script: 'mvn -Dset.changelist -Dexpression=settings.localRepository -q -DforceStdout help:evaluate', returnStdout: true |
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.
Why not infra.runMaven()
? The mirror will not be used for plugin download
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.
You cannot use runMaven
for this purpose: returnStdout
.
This could call retrieveMavenSettingsFile
again (with a sufficiently distinctive path), though it seems like overkill. This would typically be run after the main build, so the only additional plugins that might be downloaded would be maven-help-plugin
I think.
/** | ||
* When appropriate, publish artifacts from the current build to the Incrementals repository. | ||
* Call at the end of the build, outside any node, when #prepareToPublishIncrementals may have been called previously. |
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.
Is it a strong requirement?
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.
What? To call outside node
? Well nothing will break if you call it inside node
, but you will be wasting executor minutes.
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.
Yes please.
infra.prepareToPublishIncrementals()
method to optimize the resource use
infra.prepareToPublishIncrementals()
method to optimize the resource useinfra.prepareToPublishIncrementals()
method to optimize the resource usage
Tested in jenkinsci/jenkins-test-harness#162. @oleg-nenashev @rtyler