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

Downstream pipelines not triggered when using Authorize Project Plugin

    Details

    • Similar Issues:

      Description

      Reported on https://groups.google.com/forum/#!topic/jenkinsci-users/qQxwsrvKjO4

      I'm having an issue regarding Jenkins Pipeline Maven Plugin (https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin). It always skips the downstream jobs even if "Build whenever a SNAPSHOT dependency is built" is checked.

      Here's the FINER logs showing the problem (enable FINER logs on `org.jenkinsci.plugins.pipeline.maven.listeners.DownstreamPipelineTriggerRunListener`):

      upstreamPipeline (<upstream build>, visibleByDownstreamBuildAuth: false),  downstreamPipeline (<downstream pipeline>, visibleByUpstreamBuildAuth: true), upstreamBuildAuth: org.acegisecurity.providers.UsernamePasswordAuthenticationToken@1f: Username: <user>; Password: [PROTECTED]; 
      
      Skip triggering of <downstream pipeline> by <upstream pipeline> #<build>: downstreamVisibleByUpstreamBuildAuth: true, upstreamVisibleByDownstreamBuildAuth: false
      

      The value for visibleByDownstreamBuildAuth is always false. Any ideas how to make that value true?

      Also Jenkins has this troubleshooting guide but my settings are already correct.
      https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin#PipelineMavenPlugin-Mydownstreampipelinesdon'tgettriggeredevenifIuse%22BuildwheneveraSNAPSHOTdependencyisbuilt%22

        Attachments

          Issue Links

            Activity

            Hide
            cleclerc Cyrille Le Clerc added a comment -

            Fixed in 3.8.1

            Show
            cleclerc Cyrille Le Clerc added a comment - Fixed in 3.8.1
            Hide
            mhochet Maxime Hochet added a comment -

            Hello, I updated the plugin to version 3.8.2.

            In the case of multibranch pipeline jobs, it doesn't work. May this ticket be reopen please?

            Thanks.

            Show
            mhochet Maxime Hochet added a comment - Hello, I updated the plugin to version 3.8.2. In the case of multibranch pipeline jobs, it doesn't work. May this ticket be reopen please? Thanks.
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            Maxime Hochet do you observe a regression between 3.8.1 and 3.8.2? It would be very strange as changes in 3.8.2 are not related at all to these pieces of code.

            Show
            cleclerc Cyrille Le Clerc added a comment - Maxime Hochet do you observe a regression between 3.8.1 and 3.8.2? It would be very strange as changes in 3.8.2 are not related at all to these pieces of code.
            Hide
            mhochet Maxime Hochet added a comment - - edited

            I don't think it is a regression. We have pipeline and multibranch pipeline jobs. For the first ones, it is OK. not the second ones.

            Usecase:

            • 2 projects: A and B tracked with Git. A is declared as a dependency of B
            • 2 multibranch pipelines (with checkboxes checked: 'build if SNAPHSOT dependency is built'): One for A and one for B.
            • For each branch I have a job.
            • One branch pipeline A builds A as a SNAPSHOT version.
            • One branch pipeline B builds B with A as a SNAPSHOT dependency (built from the previous branch pipeline).
            • Without Authorize Project Plugin: branch pipeline A triggers B.
            • With Authorize Project Plugin: Nothing occurs.

             

            Maybe previous comments are only related to (non multibranch) pipelines jobs?

             

            Show
            mhochet Maxime Hochet added a comment - - edited I don't think it is a regression. We have pipeline and multibranch pipeline jobs. For the first ones, it is OK. not the second ones. Usecase: 2 projects: A and B tracked with Git. A is declared as a dependency of B 2 multibranch pipelines (with checkboxes checked: 'build if SNAPHSOT dependency is built'): One for A and one for B. For each branch I have a job. One branch pipeline A builds A as a SNAPSHOT version. One branch pipeline B builds B with A as a SNAPSHOT dependency (built from the previous branch pipeline). Without Authorize Project Plugin: branch pipeline A triggers B. With Authorize Project Plugin: Nothing occurs.   Maybe previous comments are only related to (non multibranch) pipelines jobs?  
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            Maxime Hochet can you please:

            • enable FINER logs on the logger `org.jenkinsci.plugins.pipeline.maven.listeners.DownstreamPipelineTriggerRunListener`
            • run the parent pipeline
            • look at the build console of the triggered parent pipeline and search for messages looking like
              upstreamPipeline (<upstream build>, visibleByDownstreamBuildAuth: false),  downstreamPipeline (<downstream pipeline>, visibleByUpstreamBuildAuth: true), upstreamBuildAuth: org.acegisecurity.providers.UsernamePasswordAuthenticationToken@1f: Username: <user>; Password: [PROTECTED]; 
              
              Skip triggering of <downstream pipeline> by <upstream pipeline> #<build>: downstreamVisibleByUpstreamBuildAuth: true, upstreamVisibleByDownstreamBuildAuth: false
              
            Show
            cleclerc Cyrille Le Clerc added a comment - Maxime Hochet can you please: enable FINER logs on the logger `org.jenkinsci.plugins.pipeline.maven.listeners.DownstreamPipelineTriggerRunListener` run the parent pipeline look at the build console of the triggered parent pipeline and search for messages looking like upstreamPipeline (<upstream build>, visibleByDownstreamBuildAuth: false), downstreamPipeline (<downstream pipeline>, visibleByUpstreamBuildAuth: true), upstreamBuildAuth: org.acegisecurity.providers.UsernamePasswordAuthenticationToken@1f: Username: <user>; Password: [PROTECTED]; Skip triggering of <downstream pipeline> by <upstream pipeline> #<build>: downstreamVisibleByUpstreamBuildAuth: true, upstreamVisibleByDownstreamBuildAuth: false

              People

              • Assignee:
                cleclerc Cyrille Le Clerc
                Reporter:
                cleclerc Cyrille Le Clerc
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: