I know this behavior well.
I conclude that it's not a bug (a behavior to be fixed), but a limitation (a behavior not to be fixed).

As it is very complicated, I'm not sure I can exactly explain the details (I know my English is poor). But I try that:

  • Post build steps (Publisher) displays links in the left side of project pages by implementing Publisher#getProjectActions.
  • You can use each Publisher at most only once in a project. For example, if you added "Archiving artifacts" to a project, you cannot add more new "Archiving artifacts" to that project.
  • Using Flexible Publish, you can define a same Publisher for multiple times. This is an irregular case. For example, you can add two "Archiving artifacts" for condition A and condition B. This results Publisher#getProjectActions of a same Publisher are called multiple times for a project. This results duplicated links in a project page.
  • As described before, Publisher should be defined only one in a project. So it's not a bug of Publisher to display duplicated links.
  • At the same time, Flexible Publish does not know how to handle links. Those links may be better to be displayed for each definition, or may be better to be displayed only once (like Warnings plugin).

As far as I know, this behavior doesn't results harmful, and I don't plan to fix it.

If you try to fix that, the way of SubProjectsAction of parameterized-trigger plugin may be helpful.
https://github.com/jenkinsci/parameterized-trigger-plugin/blob/master/src/main/java/hudson/plugins/parameterizedtrigger/SubProjectsAction.java
https://github.com/jenkinsci/parameterized-trigger-plugin/blob/master/src/main/resources/hudson/plugins/parameterizedtrigger/SubProjectsAction/jobMain.groovy

If multiple {{SubProjectsAction}}s are defined to a build, it aggregates all {{SubProjectsAction}}s to display.
I think aggregating WarningsProjectAction and displaying a link only for the first one would fix the behavior.
But it would get so complicated, and may cause other problems.
And you need to fix not warnings-plugin, but analysis-core-plugin. It may affect other plugins using analysis-core-plugin.

Change By: ikedam (17/Aug/14 11:29 AM)
Summary: MSBuild Duplicated  Warnings  link displays twice on builds if added as conditional build step  links when used with Flexible Publish plugin
Issue Type: Bug Improvement
Assignee: ikedam Ulli Hafner
Component/s: analysis-core
Component/s: conditional-buildstep
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to