-
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
Add Swarm Plugin support to PCT #188
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.
LGTM. The comments are rather a subject for the future improvement
@@ -85,7 +85,7 @@ public void validate(Map<String, Object> toCheck) throws Exception { | |||
@Override | |||
public boolean check(Map<String, Object> info) throws Exception { | |||
return BlueOceanHook.isBOPlugin(info) || DeclarativePipelineHook.isDPPlugin(info) || StructsHook.isStructsPlugin(info) || | |||
ConfigurationAsCodeHook.isCascPlugin(info) || PipelineRestApiHook.isPipelineStageViewPlugin(info); | |||
SwarmHook.isSwarmPlugin(info) || ConfigurationAsCodeHook.isCascPlugin(info) || PipelineRestApiHook.isPipelineStageViewPlugin(info); |
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 should finally rewrite the hook engine at some point to an extension-alike approach.
This line makes me cry :D
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.
Agreed, this would be a good area for future improvement.
@@ -58,7 +59,7 @@ public boolean check(Map<String, Object> info) { | |||
boolean coreRequiresNewParentPOM = coreCoordinates.compareVersionTo(CORE_NEW_PARENT_POM) >= 0; | |||
boolean coreRequiresPluginOver233 = coreCoordinates.compareVersionTo(CORE_WITHOUT_WAR_FOR_TEST) >= 0; | |||
|
|||
if (isDeclarativePipeline || isBO || isCB || isStructs || isCasC || isPipelineStageViewPlugin || (pluginPOM && parentV2)) { | |||
if (isDeclarativePipeline || isBO || isCB || isStructs || isCasC || isPipelineStageViewPlugin || isSwarm || (pluginPOM && parentV2)) { |
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.
Same here
Thanks @basil ! |
Adding Swarm support to PCT following the existing examples for Pipeline: Delarative, Pipeline: REST API, and Structs.
First, I added a new
SwarmHook
class with the details of the Swarm plugin's structure. Then, I updatedMultiParentCompileHook
andTransformPom
to add references toSwarmHook
following the existing examples.I added an integration test in
src/it/war-with-plugins-test/packager-config.yml
, but I'm not sure how to run it. I tested PCT against Swarm locally in the BOM project before and after this change. Before, it failed; after, it passed.