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
[WIP]Make compatible with pipelines #2
base: master
Are you sure you want to change the base?
Conversation
@@ -112,4 +118,40 @@ public String getMetricFilePath() { | |||
return metricFilePath; | |||
} | |||
|
|||
@Override | |||
public void perform(@Nonnull Run<?, ?> run, @Nonnull FilePath filePath, @Nonnull Launcher launcher, @Nonnull TaskListener taskListener) { |
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 should replace the old perform method iirc, not added as an extra.
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.
Thanks, I'll change that!
@@ -223,4 +224,8 @@ public void setResultFilePath(FilePath resultFilePath) { | |||
this.resultFilePath = resultFilePath; | |||
} | |||
|
|||
@Override | |||
public void checkRoles(RoleChecker roleChecker) throws SecurityException { |
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.
Extend MasterToSlaveFileCallable
instead of implementing your own role checker.
https://wiki.jenkins.io/display/JENKINS/Slave+To+Master+Access+Control#SlaveToMasterAccessControl-I'maplugindeveloper.WhatshouldIdo?
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.
Oh, this is part of the legacy code I didn't change. But I can modify that too.
@rsandell Thank you for your comments, I did the requested modifications and tested them. |
👍 LGTM |
Though you should add a few tests that use a pipeline job to verify it works as intended :) |
Ok! I'll add some tests, and update the README file. |
The purpose of this PR is to get the plug-in to work with the (not so) new pipeline/workflow system of Jenkins. Since the repo hasn't been updated for a looot of time, there are also some dependencies updates.
I'd appreciate some feedback, as I'm not at all a expert Jenkins API programer nor a specialist of Jenkins it self. For what I tested on my own instance, my commits don't seem to break the plug-in. :)
TODO:
perform
methodCcccParser
, extendMasterToSlaveFileCallable
instead of overridingcheckRoles
.