Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28709

Join Plugin ignores dependencies wrapped with flexible-publish

    Details

    • Similar Issues:

      Description

      Join trigger doesn't work in the expected way when combined with Flexible Publish plugin.

      • Project A triggers project B, project C conditionally (using flexible-publish).
      • Project A triggers project D via Join plugin.

      In this case, join plugin works as followings unexpectedly:

      • (not critical) Project B,C,D will be displayed in the project status page.
        • Expected bahaivor: Only project B, C will be displayed.
      • (critical) Project D is triggered just after project A finished.
        • Project D is triggered after project B, C finished.

      This is the behavior just like when project A has no project dependencies except join trigger.
      This means join trigger fails to find out dependencies wrapped with flexible-publish.


      Hi,

      I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

      So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they have built successfully.

      When I have a look of my main project dashboard I see it triggers all of the 3 projects as downstream whereas It should trigger only the first two ones

        Attachments

          Activity

          raphc Raphael CHAUMIER created issue -
          raphc Raphael CHAUMIER made changes -
          Field Original Value New Value
          Component/s join-plugin [ 15635 ]
          raphc Raphael CHAUMIER made changes -
          Description Hi,

          I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

          So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they build successfully.

          When I have a look of my main project I see It trigger all of the 3 projects as downstream whereas It should trigger only the first two ones
          Hi,

          I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

          So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they have built successfully.

          When I have a look of my main project I see It trigger all of the 3 projects as downstream whereas It should trigger only the first two ones
          raphc Raphael CHAUMIER made changes -
          Description Hi,

          I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

          So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they have built successfully.

          When I have a look of my main project I see It trigger all of the 3 projects as downstream whereas It should trigger only the first two ones
          Hi,

          I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

          So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they have built successfully.

          When I have a look of my main project dashboard I see It trigger all of the 3 projects as downstream whereas It should trigger only the first two ones
          raphc Raphael CHAUMIER made changes -
          Description Hi,

          I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

          So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they have built successfully.

          When I have a look of my main project dashboard I see It trigger all of the 3 projects as downstream whereas It should trigger only the first two ones
          Hi,

          I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

          So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they have built successfully.

          When I have a look of my main project dashboard I see it triggers all of the 3 projects as downstream whereas It should trigger only the first two ones
          ikedam ikedam made changes -
          Assignee bap [ bap ] ikedam [ ikedam ]
          Hide
          ikedam ikedam added a comment -

          I don't know much about join plugin, but that sounds the expected behavior.
          You mean

          • Project A triggers project B and project C in some conditions.
          • Project A triggers project D after B,C finished (join).

          That means A triggers B,C,D, doesn't it?

          Show
          ikedam ikedam added a comment - I don't know much about join plugin, but that sounds the expected behavior. You mean Project A triggers project B and project C in some conditions. Project A triggers project D after B,C finished (join). That means A triggers B,C,D, doesn't it?
          Hide
          raphc Raphael CHAUMIER added a comment - - edited

          Exactly, but In a normal way (without flexible plugin), Jenkins well handles downstream jobs. On the job dashboard only project B and C appears. Why does it seems different with flexible plugin ?

          Thks

          Show
          raphc Raphael CHAUMIER added a comment - - edited Exactly, but In a normal way (without flexible plugin), Jenkins well handles downstream jobs. On the job dashboard only project B and C appears. Why does it seems different with flexible plugin ? Thks
          Hide
          ikedam ikedam added a comment -

          It is just because join plugin fails to find out dependencies wrapped with flexible-publish.
          You can also see project D is displayed in the project status page when you configure a project with "Join Trigger" without "Build other projects".

          To be exact, JoinTrigger#getAllDownstream fails to find out them: https://github.com/jenkinsci/join-plugin/blob/join-1.15/src/main/java/join/JoinTrigger.java#L216

          This results not only project D is displayed but also project D is always triggered just after project A is finished. That means, join doesn't work at all.

          Show
          ikedam ikedam added a comment - It is just because join plugin fails to find out dependencies wrapped with flexible-publish. You can also see project D is displayed in the project status page when you configure a project with "Join Trigger" without "Build other projects". To be exact, JoinTrigger#getAllDownstream fails to find out them: https://github.com/jenkinsci/join-plugin/blob/join-1.15/src/main/java/join/JoinTrigger.java#L216 This results not only project D is displayed but also project D is always triggered just after project A is finished. That means, join doesn't work at all.
          ikedam ikedam made changes -
          Summary Wrong Downstream project where Join Plugin is used Join Plugin ignores dependencies wrapped with flexible-publish
          Component/s flexible-publish-plugin [ 16130 ]
          Description Hi,

          I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

          So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they have built successfully.

          When I have a look of my main project dashboard I see it triggers all of the 3 projects as downstream whereas It should trigger only the first two ones
          Join trigger doesn't work in the expected way when combined with [Flexible Publish plugin|https://wiki.jenkins-ci.org/display/JENKINS/Flexible+Publish+Plugin].

          * Project A triggers project B, project C conditionally (using flexible-publish).
          * Project A triggers project D via Join plugin.

          In this case, join plugin works as followings unexpectedly:
          * (not critical) Project B,C,D will be displayed in the project status page.
          ** Expected bahaivor: Only project B, C will be displayed.
          * (critical) Project D is triggered just after project A finished.
          ** Project D is triggered after project B, C finished.

          This is the behavior just like when project A has no project dependencies except join trigger.
          This means join trigger fails to find out dependencies wrapped with flexible-publish.

          ----

          Hi,

          I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

          So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they have built successfully.

          When I have a look of my main project dashboard I see it triggers all of the 3 projects as downstream whereas It should trigger only the first two ones
          Assignee ikedam [ ikedam ] mdonohue [ mdonohue ]
          Hide
          ikedam ikedam added a comment -

          Promoted Builds Plugin might be an alternate solution for you.

          Show
          ikedam ikedam added a comment - Promoted Builds Plugin might be an alternate solution for you.
          Hide
          raphc Raphael CHAUMIER added a comment -

          Thanks ikedam for your explanations.

          I'll try promoted builds plugin. So the problem is on Join plugin.

          Regards

          Show
          raphc Raphael CHAUMIER added a comment - Thanks ikedam for your explanations. I'll try promoted builds plugin. So the problem is on Join plugin. Regards
          Hide
          edgar0119 Edgar Yu added a comment -
          Show
          edgar0119 Edgar Yu added a comment - I was fix it on here! https://github.com/Edgar0119/join-plugin and I wss pull a merge request https://github.com/jenkinsci/join-plugin/pull/9
          Hide
          mdonohue mdonohue added a comment -

          I commented on the pull request - it looks like whitespace was changed as part of the commit, making the diff difficult to read.
          It is recommended practice on any project to separate whitespace changes from content changes, so I can't accept this as-is.

          Show
          mdonohue mdonohue added a comment - I commented on the pull request - it looks like whitespace was changed as part of the commit, making the diff difficult to read. It is recommended practice on any project to separate whitespace changes from content changes, so I can't accept this as-is.
          Hide
          edgar0119 Edgar Yu added a comment -

          Hello, I has pull request again to fix this bug. https://github.com/jenkinsci/join-plugin/pull/10

          Show
          edgar0119 Edgar Yu added a comment - Hello, I has pull request again to fix this bug. https://github.com/jenkinsci/join-plugin/pull/10
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: 俞韋廷
          Path:
          pom.xml
          src/main/java/join/JoinTrigger.java
          http://jenkins-ci.org/commit/join-plugin/246a1fb66f5c39b5f36489014269937668d58412
          Log:
          JENKINS-28709 Join Plugin ignores dependencies wrapped with flexible-publish

          (https://issues.jenkins-ci.org/browse/JENKINS-28709)

          Now it can handle "hudson.plugins.parameterizedtrigger.BuildTrigger" in Flexible publisher!

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: 俞韋廷 Path: pom.xml src/main/java/join/JoinTrigger.java http://jenkins-ci.org/commit/join-plugin/246a1fb66f5c39b5f36489014269937668d58412 Log: JENKINS-28709 Join Plugin ignores dependencies wrapped with flexible-publish ( https://issues.jenkins-ci.org/browse/JENKINS-28709 ) Now it can handle "hudson.plugins.parameterizedtrigger.BuildTrigger" in Flexible publisher!
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Michael Donohue
          Path:
          pom.xml
          src/main/java/join/JoinTrigger.java
          http://jenkins-ci.org/commit/join-plugin/7ff674339affb5d72116c405ace1d1a90acc63c3
          Log:
          Merge pull request #10 from Edgar0119/master

          (Bug Fixed!)JENKINS-28709 Join Plugin ignores dependencies wrapped with flexible-…

          Compare: https://github.com/jenkinsci/join-plugin/compare/54908f824cc4...7ff674339aff

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Donohue Path: pom.xml src/main/java/join/JoinTrigger.java http://jenkins-ci.org/commit/join-plugin/7ff674339affb5d72116c405ace1d1a90acc63c3 Log: Merge pull request #10 from Edgar0119/master (Bug Fixed!) JENKINS-28709 Join Plugin ignores dependencies wrapped with flexible-… Compare: https://github.com/jenkinsci/join-plugin/compare/54908f824cc4...7ff674339aff
          edgar0119 Edgar Yu made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          edgar0119 Edgar Yu added a comment -

          This bug is solved in the join-plugin version 1.20

          Reference:
          1. join-plugin GitHub releases page
          2. https://wiki.jenkins-ci.org/display/JENKINS/Join+Plugin

          Show
          edgar0119 Edgar Yu added a comment - This bug is solved in the join-plugin version 1.20 Reference: 1. join-plugin GitHub releases page 2. https://wiki.jenkins-ci.org/display/JENKINS/Join+Plugin
          edgar0119 Edgar Yu made changes -
          Status In Progress [ 3 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 163564 ] JNJira + In-Review [ 208843 ]

            People

            • Assignee:
              mdonohue mdonohue
              Reporter:
              raphc Raphael CHAUMIER
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: