-
Notifications
You must be signed in to change notification settings - Fork 49
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
plugin modernization #58
Conversation
bump to require jenkins 2.361.4 use ionicons replace some deprecated things with recommended alternatives fix optOut help for the job property use newer maven in the test
javax.annotation is deprecated
the default prevents an exception when checking the regexpForMatrixStrategy after adding the naginator publisher for the first time.
@@ -229,9 +226,6 @@ public DescriptorImpl getDescriptor() { | |||
return (DescriptorImpl) super.getDescriptor(); | |||
} | |||
|
|||
@Extension |
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.
The Extension annotation is now directly on the NaginatorListener
/** | ||
* Creates a new instance of {@link NaginatorPublisher} from a submitted form. | ||
*/ | ||
@Override | ||
public Notifier newInstance(StaplerRequest req, JSONObject formData) throws FormException { | ||
return req.bindJSON(NaginatorPublisher.class, formData); | ||
} | ||
|
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.
The default implementation is doing the same and properly handles the theoretically possible case that req
is null
FreeStyleProject p = j.createFreeStyleProject(); | ||
FreeStyleBuild build1 = p.scheduleBuild2(0).get(); | ||
build1.setDisplayName("<div id=\"unescaped-displayname\">bad displayname</div>"); | ||
build1.setDisplayName("<div id=\"unescaped-displayname\">bad displayname</div>"); |
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.
Change note: Unprintable whitespace between setDisplayName
and (
is removed.
@@ -1,4 +1,4 @@ | |||
<div> | |||
By default, naginator offer a "rebuild" link to all failed builds. Some jobs anyway might not be designed to | |||
By default, naginator offers a "retry" link to all failed builds. Some jobs anyway might not be designed to |
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.
@@ -14,13 +14,18 @@ | |||
* @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a> | |||
*/ | |||
@Extension | |||
public class NaginatorActionFactory extends TransientBuildActionFactory { | |||
public class NaginatorActionFactory extends TransientActionFactory<AbstractBuild> { |
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.
Review note: TransientBuildActionFactory
and TransientActionFactory
is binary incompatible, but I believe OK
(OK means we don't need to change the major version to mark binary incompatible).
I believe external modules never depend on NaginatorActionFactory
.
@@ -32,8 +32,7 @@ | |||
</f:entry> | |||
<j:if test="${descriptor.isMatrixProject(it)}"> | |||
<f:entry title="${%How to apply the regular expression to matrix}" field="regexpForMatrixStrategy"> | |||
<!-- unfortunatelly, f:enum doesn't support doCheckXxxx --> | |||
<f:select /> | |||
<f:select default="TestParent"/> |
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.
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.
Without this when adding the Publisher for the first time an exception is thrown and the UI breaks.
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 for the request.
The change almost looks good to me. I want to keep title
for the icon if we could.
Could you attach screenshots for icons? I think I can try that in the next weekend (unfortunately, I don't have an appropriate environment now), but the screenshot will be helpful if that doesn't bother you.
src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorAction/badge.jelly
Outdated
Show resolved
Hide resolved
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 for updates and screenshots!
I'm planning makina a new release tomorrow: #60 |
The plugin is currently on a very old Jenkins version (1.565). This implies dependencies to other plugins that have been extracted from core since then and prevents me from uninstalling these plugins.
bump to require jenkins 2.361.4
use ionicons
replace some deprecated things with recommended alternatives (e.g. javax.annotation)
fix optOut help for the job property
use newer maven in the test
Pane:

Retry link:

Dark Theme:

Pane:
Retry link:

Testing done
Submitter checklist