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

"Build whenever a SNAPSHOT dependency is built" should work in way that is more expected

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • None

      I have a lot of maven builds and all they include "Build whenever a SNAPSHOT dependency is built" option.
      But for some pairs of connected builds this option doesn't work.
      I even don't know where to look for errors.
      When I open parent task I see that it has child task in downstream builds section but after successful build child task is not triggered.
      The most strange that for some pairs this works, for some - not.

      The reason of this seems to be discussed in JENKINS-6174.
      What I want to have.

      1. When I open parent task - I shouldn't see any relation that is not to be triggered in this way.
      2. As current "Build whenever a SNAPSHOT dependency is built" chooses just one downstream project - I'd like to have another option that works as expected - builds absolutely each downstream project.

          [JENKINS-13390] "Build whenever a SNAPSHOT dependency is built" should work in way that is more expected

          evernat added a comment -

          Is it reproduced with a recent Jenkins version?

          evernat added a comment - Is it reproduced with a recent Jenkins version?

          I've observed weirdness that appears to be related. From my observations if a potential downstream job has this checked, and there are multiple jobs which could potentially become upstream jobs to the downstream job, Jenkins simple associates with the most recently created upstream job.

          Daniel Kirkdorffer added a comment - I've observed weirdness that appears to be related. From my observations if a potential downstream job has this checked, and there are multiple jobs which could potentially become upstream jobs to the downstream job, Jenkins simple associates with the most recently created upstream job.

          Maybe this issue, JENKINS-6174, sheds light on the matter.

          Daniel Kirkdorffer added a comment - Maybe this issue, JENKINS-6174 , sheds light on the matter.

          Daniel, that issue just reports that they aren't going to fix this.. I am very upset..

          Boris Romashov added a comment - Daniel, that issue just reports that they aren't going to fix this.. I am very upset..

          Yves Schumann added a comment -

          Any news on this request?

          I'm running into the same problem with a job with a huge amount of modules. These job uses the incremental option to increase speed. Some of these modules produce *.ear artifacts, which should be deployed to an application container. These deployments take a huge amount of time, so we have separate deployment jobs. But exactly these jobs should only be triggered, if the corresponding *.ear-snapshot was build!

          Yves Schumann added a comment - Any news on this request? I'm running into the same problem with a job with a huge amount of modules. These job uses the incremental option to increase speed. Some of these modules produce *.ear artifacts, which should be deployed to an application container. These deployments take a huge amount of time, so we have separate deployment jobs. But exactly these jobs should only be triggered, if the corresponding *.ear-snapshot was build!

          Guy Rooms added a comment -

          Also ran into this problem: I would also expect to have all downstream jobs triggered
          Apart from that discussion (whether or not all jobs should be triggered), I believe it is not acceptable to have all those downstream jobs displayed as downstream jobs while they are not being triggered.
          In current behavior, logging could at least be improved to indicate that (or why) some jobs were not triggered 'on purpose'.

          Guy Rooms added a comment - Also ran into this problem: I would also expect to have all downstream jobs triggered Apart from that discussion (whether or not all jobs should be triggered), I believe it is not acceptable to have all those downstream jobs displayed as downstream jobs while they are not being triggered . In current behavior, logging could at least be improved to indicate that (or why) some jobs were not triggered 'on purpose'.

          I have this happening to virtually all of my Maven project builds. Only a few of them trigger when their upstream dependency builds. Nothing in the logs.

          Anthony Guselnikov added a comment - I have this happening to virtually all of my Maven project builds. Only a few of them trigger when their upstream dependency builds. Nothing in the logs.

          One of the problem here is missunderstanding the downstream list, one (or maybe many ones) may think that all downstream projects should be triggered when current job has been built, but in fact the SNAPSHOT dependency trigger treat each downstream project separatley and for each decides whether it can/should be triggered. For example for us it is a problem when one of downstream projects will not be triggered when it has other snapshot dependencies and there are no sucessfull builds of such dependency (Jenkins does not take into account that you can have this snapshot in your maven repo), to get rid with this I did the enhancement and now waiting for the next release.

          To summarize this: in general it is not so trivial (if realy possible) to do not list downstreams when they will not be triggered

          Alex Zherebtsov added a comment - One of the problem here is missunderstanding the downstream list, one (or maybe many ones) may think that all downstream projects should be triggered when current job has been built, but in fact the SNAPSHOT dependency trigger treat each downstream project separatley and for each decides whether it can/should be triggered. For example for us it is a problem when one of downstream projects will not be triggered when it has other snapshot dependencies and there are no sucessfull builds of such dependency (Jenkins does not take into account that you can have this snapshot in your maven repo), to get rid with this I did the enhancement and now waiting for the next release. To summarize this: in general it is not so trivial (if realy possible) to do not list downstreams when they will not be triggered

            Unassigned Unassigned
            boraldo Boris Romashov
            Votes:
            8 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: