-
Notifications
You must be signed in to change notification settings - Fork 53
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
Allow PCT to use info from a bom file #202
Allow PCT to use info from a bom file #202
Conversation
imonteroperez
commented
Oct 11, 2019
- Provides support for PCT testing using bom files cc/ @raul-arabaolaza
- Depends on: [JENKINS-58113] - Remove the Internal Maven Mode from PCT + Use maven from PATH when "-mvn" is not specified #194
|
||
File bomFile = new ClassPathResource("jenkins-bom.xml").getFile(); | ||
config.setBom(bomFile); | ||
config.setIncludePlugins(includedPlugins); |
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.
This test class needs config.setExternalMaven(<whatever-location>)
i.e.: config.setExternalMaven(new File("/usr/bin/mvn"));
but based on: #194 I let this without that config update.
LGTM given we will wait for #194 to be merged to get a green build here :) |
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.
WE are missing the README update, but code LGTM
Updated README file on f9c66c2 |
data = scanBom(pluginGroupIds, "([^/.]+)[.][hj]pi"); | ||
} else { | ||
data = config.getWar() == null ? extractUpdateCenterData(pluginGroupIds) : scanWAR(config.getWar(), pluginGroupIds, "WEB-INF/(?:optional-)?plugins/([^/.]+)[.][hj]pi"); | ||
} |
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.
Interesting but will not fix the problem in #228, since we would still be contacting the UC.
This PR could solve the problem in a different way, by extracting groupId
s from the BOM including for detached plugins. Perhaps it is already effectively doing that, or we can assume that the BOM manages versions for all detached plugins of interest, in which case this PR could simply be extended to skip extractUpdateCenterData
in case -bom
is passed.
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.