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

Pipeline polling ignores special polling rules

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The git plugin currently offers several special rules on polling:

      1. Polling ignores commits from certain users
      2. Polling ignores commits from certain paths (Included/Excluded regions)
      3. Polling ignores commits with certain messages
      4. Branch specifier

      For example:
      checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'UserExclusion', excludedUsers: 'dvader'], [$class: 'PathRestriction', excludedRegions: 'One/.*', includedRegions: 'Test/.*'], [$class: 'MessageExclusion', excludedMessage: '.\\[maven-release-plugin
      ].
      ']], gitTool: 'Default', submoduleCfg: [], userRemoteConfigs: [[credentialsId: '...', url: 'ssh://git@bitbucket.org/test.git']]])

      If a commit is committed to bitbucket.org/test.git, regardless of the user, location, branch or message, the step that includes the checkout will be run.

      Similar issue has been reported in:

        Attachments

          Issue Links

            Activity

            Hide
            jackiexiao Jackie Xiao added a comment -

            For multibranch pipeline jobs, are there any workarounds for Subversion with the 'checkout' step (includedRegions/excludedRegions)?

            Something like: 

            def scm = checkout scm: [

              $class:'SubversionSCM',
              extensions: [
                [$class: 'PathRestriction', excludedRegions: '', includedRegions: '.+\\.java']
              ]
            ]

            Show
            jackiexiao Jackie Xiao added a comment - For multibranch pipeline jobs, are there any workarounds for Subversion with the 'checkout' step (includedRegions/excludedRegions)? Something like:  def scm = checkout scm: [   $class:'SubversionSCM',   extensions: [     [$class: 'PathRestriction', excludedRegions: '', includedRegions: '.+\\.java']   ] ]
            Hide
            kmleinen Kyle Leinen added a comment - - edited

            From reading the original ticket notes along with the responses, I think this one is more in alignment with special rules around a single repository and not multiple repos.

            Show
            kmleinen Kyle Leinen added a comment - - edited From reading the original ticket notes along with the responses, I think this one is more in alignment with special rules around a single repository and not multiple repos.
            Hide
            smekkley smek added a comment -

            Does this issue also aim to solve the issue where you can't poll multiple git repository with pipeline jobs?

            Show
            smekkley smek added a comment - Does this issue also aim to solve the issue where you can't poll multiple git repository with pipeline jobs?
            Hide
            jaheikki Jari Heikkilä added a comment -

            Hi, I think I have the same issue, PathRestriction/includedRegions defined in Jenkinsfile does not work:
            "[$class: 'PathRestriction', excludedRegions: '', includedRegions: '<included-directory>/.*']"
            It seems that Jenkins Polling log says correctly that commit to other folder than 'includedRegions' is ignored, but still the build is started by scm change. Clip from Polling log:

            "Ignored commit afa14f5970cdaa2d3d3a96f0c76cabf3aa2928dc: No paths matched included region whitelist"

            However PathRestriction/includedRegions seems to work at least in Jenkins Freestyle project when configuring restriction in Jenkins GUI.
            But why this issue type is "Improvement", I consider this a bug?

            Show
            jaheikki Jari Heikkilä added a comment - Hi, I think I have the same issue, PathRestriction/includedRegions defined in Jenkinsfile does not work: " [$class: 'PathRestriction', excludedRegions: '', includedRegions: '<included-directory>/.*'] " It seems that Jenkins Polling log says correctly that commit to other folder than 'includedRegions' is ignored, but still the build is started by scm change. Clip from Polling log: "Ignored commit afa14f5970cdaa2d3d3a96f0c76cabf3aa2928dc: No paths matched included region whitelist" However PathRestriction/includedRegions seems to work at least in Jenkins Freestyle project when configuring restriction in Jenkins GUI. But why this issue type is "Improvement", I consider this a bug?
            Hide
            markewaite Mark Waite added a comment -

            There have been some brief discussions about it, but there are no plans to address it.

            Show
            markewaite Mark Waite added a comment - There have been some brief discussions about it, but there are no plans to address it.

              People

              • Assignee:
                Unassigned
                Reporter:
                dvader Darth Vader
              • Votes:
                90 Vote for this issue
                Watchers:
                95 Start watching this issue

                Dates

                • Created:
                  Updated: