-
-
Notifications
You must be signed in to change notification settings - Fork 19
Fixes #17 make pipeline-compatible #18
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,15 +4,24 @@ | |
| import hudson.model.AbstractDescribableImpl; | ||
| import hudson.model.Descriptor; | ||
| import org.kohsuke.stapler.DataBoundConstructor; | ||
| import org.kohsuke.stapler.DataBoundSetter; | ||
|
|
||
| public class Rpm extends AbstractDescribableImpl<Rpm> { | ||
|
|
||
| private final String gpgKeyName; | ||
| private final String includes; | ||
| private final String cmdlineOpts; | ||
| private final boolean resign; | ||
| private String gpgKeyName; | ||
| private String includes; | ||
| private String cmdlineOpts; | ||
| private boolean resign; | ||
|
|
||
| @DataBoundConstructor | ||
| public Rpm() { | ||
| this.gpgKeyName = ""; | ||
| this.includes = "**/**.rpm"; | ||
| this.resign = false; | ||
| this.cmdlineOpts = ""; | ||
| } | ||
|
|
||
| @Deprecated | ||
| public Rpm(String gpgKeyName, String includes, String cmdlineOpts, boolean resign) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why deprecate the old constructor? Do pipeline uses of this plugin use the setters instead of the constructor? Wouldn't this constructor still be appropriate for non-pipeline configurations?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pipeline uses constructor, and setter annotated with @DataBoundConstructor, @DataBoundSetter annotations respectively. |
||
| this.gpgKeyName = gpgKeyName; | ||
| this.includes = includes; | ||
|
|
@@ -36,6 +45,26 @@ public boolean isResign() { | |
| return resign; | ||
| } | ||
|
|
||
| @DataBoundSetter | ||
| public void setGpgKeyName(final String gpgKeyName) { | ||
| this.gpgKeyName = gpgKeyName; | ||
| } | ||
|
|
||
| @DataBoundSetter | ||
| public void setIncludes(final String includes) { | ||
| this.includes = includes; | ||
| } | ||
|
|
||
| @DataBoundSetter | ||
| public void setCmdlineOpts(final String cmdlineOpts) { | ||
| this.cmdlineOpts = cmdlineOpts; | ||
| } | ||
|
|
||
| @DataBoundSetter | ||
| public void setResign(final boolean resign) { | ||
| this.resign = resign; | ||
| } | ||
|
|
||
| @Extension | ||
| public static class DescriptorImpl extends Descriptor<Rpm> { | ||
|
|
||
|
|
||
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 remove this null check?
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.
It can not be null.
getPlainText() method of Secret class uses value field and it is annotated as @nonnull.