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

SCMTrigger condition includes upstream builds

XMLWordPrintable

      Based on my ad-hoc tests it appears as though the conditional build step plugin will look to upstream jobs and use the trigger settings from those configurations when deciding whether to trigger a downstream job. This should not happen - or at the very least be optional.

      Use Case

      1. Job A is triggered by a SCM trigger
      2. once complete, job A triggers Job B as a post-build step
      3. Job B has a conditional build step that is set to only run on an SCMTrigger. Given that the trigger for the current execution was the successful completion of a previous job I would expect this task to not get executed. However, apparently it does get executed in this situation because the upstream Job A had a code change and the SCMTrigger condition looks to all upstream jobs for their statuses rather than just looking at the current job.

      From what I can tell there is no way to force this condition to ignore upstream build triggers and just look at the trigger for the current job. So unless I'm missing something I would suggest that this plugin should at least add the option to ignore upstream jobs, if not remove said logic so it only ever looks at the current job.

      I am using Jenkins v1.509.1 (LTS edition), with v1.2.1 of the conditional build step plugin.

            bap bap
            leedega Kevin Phillips
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: