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

Constrain recipientProviders to one Git repository in multi-repo Pipelines

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • email-ext-plugin
    • None
    • Jenkins 2.263.3
      Email Extension Plugin 2.81

      My original Git multibranch pipeline needs additional dependent Git repositories which will be checked out in the first stage of the pipeline.

      When a pipeline run fails then the developers recipientProviders: [developers()] of the original Git repository shall be notified only. Actually commiters/developers of changes in all (original and dependent) repositories are notified.

      Is there a possibility to constrain the developers recipientProviders to developers of changes in one Git repository only?

          [JENKINS-64855] Constrain recipientProviders to one Git repository in multi-repo Pipelines

          Basil Crow added a comment -

          Email Extension just calls Jenkins core API jenkins.scm.RunWithSCM#getChangeSets to get the list of changesets. The relevant code is in WorkflowRun and SCMStep. Offhand, you might want to try experimenting with setting changelog: false in your checkout step. If that doesn't work you'll have to dig a little deeper into how WorkflowRun and SCMStep are implemented. I doubt there is anything I can do in Email Extension to help with this problem.

          Basil Crow added a comment - Email Extension just calls Jenkins core API jenkins.scm.RunWithSCM#getChangeSets to get the list of changesets. The relevant code is in WorkflowRun and SCMStep . Offhand, you might want to try experimenting with setting changelog: false in your checkout step. If that doesn't work you'll have to dig a little deeper into how WorkflowRun and SCMStep are implemented. I doubt there is anything I can do in Email Extension to help with this problem.

          m l added a comment - - edited

          basil : Setting changelog to false for the 'checkout scm' step is the right solution.

          The problem is that I use the 'checkout resolveScm' step in Workflow Multibranch and there is no changelog parameter 

          Do you have an idea how to solve this problem? Maybe I should issue a feature request for the changelog parameter in 'checkout resolveScm'?

          m l added a comment - - edited basil  : Setting changelog to false for the 'checkout scm' step is the right solution. The problem is that I use the 'checkout resolveScm' step in Workflow Multibranch and there is no changelog parameter  Do you have an idea how to solve this problem? Maybe I should issue a feature request for the changelog parameter in 'checkout resolveScm'?

          Basil Crow added a comment -

          Offhand resolveScm seems like a separate step, whose output is passed to the checkout step? If so, you should be able to invoke checkout with scm: resolveScm([…]) and changelog: false?

          Basil Crow added a comment - Offhand resolveScm seems like a separate step, whose output is passed to the checkout step? If so, you should be able to invoke checkout with scm: resolveScm( […] ) and changelog: false ?

          m l added a comment -

          Thanx! This was what I needed and it works.
          Here is my solution:

          checkout changelog: false, scm: resolveScm (
                 source: [$class: 'GiteaSCMSource',
                      serverUrl: 'http.... ,
          

          m l added a comment - Thanx! This was what I needed and it works. Here is my solution: checkout changelog: false , scm: resolveScm ( source: [$class: 'GiteaSCMSource' , serverUrl: 'http.... ,

            Unassigned Unassigned
            mrlov m l
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: