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

Equivalent to polling commit exclusions for branch indexing

    Details

    • Type: New Feature
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: branch-api-plugin
    • Labels:
      None
    • Environment:
      Windows
    • Similar Issues:

      Description

      I have an organizational project configured which scans repositories for jenkinsfile. One of the repository (https://github.com/VirtoCommerce/vc-module-jenkinssample) has a following Jenkinsfile defined:

          node 
          {
          	stage 'Checkout'
                  checkout([
                      $class: 'GitSCM', 
                      branches: [[name: '*/master']], 
                      extensions: [[
          			    $class: 'PathRestriction', 
          			    excludedRegions: 'CommonAssemblyInfo\\.cs', 
          			    includedRegions: ''
          		    ]], 
                      userRemoteConfigs: [[
                          url: 'git@github.com:VirtoCommerce/vc-module-jenkinssample.git']]])
          }
      

      As you might see I have an excluded region defined, so changes made to CommonAssemblyInfo.cs don't trigger any builds. However "Branch Indexing" still forces the job to build when I commit changes to "CommonAssemblyInfo.cs". How can I prevent this?

      Btw, the above script works fine in a separate/individual Pipeline Job.

        Attachments

        1. multibranch_indexing_options.png
          multibranch_indexing_options.png
          182 kB
        2. non_multibranch_pipeline_filters.png
          non_multibranch_pipeline_filters.png
          147 kB
        3. screenshot-1.png
          screenshot-1.png
          2 kB
        4. screenshot-2.png
          screenshot-2.png
          95 kB
        5. workaround.txt
          0.9 kB

          Issue Links

            Activity

            woland Alexander Siniouguine created issue -
            woland Alexander Siniouguine made changes -
            Field Original Value New Value
            Description I have an organizational project configured which scans repositories for jenkinsfile. One of the repository (https://github.com/VirtoCommerce/vc-module-jenkinssample) has a following Jenkinsfile defined:

                node
                {
                 stage 'Checkout'
                        checkout([
                            $class: 'GitSCM',
                            branches: [[name: '*/master']],
                            extensions: [[
                 $class: 'PathRestriction',
                 excludedRegions: 'CommonAssemblyInfo\\.cs',
                 includedRegions: ''
                 ]],
                            userRemoteConfigs: [[
                                url: 'git@github.com:VirtoCommerce/vc-module-jenkinssample.git']]])
                }

            As you might see I have an excluded region defined, so changes made to CommonAssemblyInfo.cs don't trigger any builds. However "Branch Indexing" still forces the job to build when I commit changes to "CommonAssemblyInfo.cs". How can I prevent this?

            Btw, the above script works fine in a separate/individual Pipeline Job.
            I have an organizational project configured which scans repositories for jenkinsfile. One of the repository (https://github.com/VirtoCommerce/vc-module-jenkinssample) has a following Jenkinsfile defined:

            {{
                node
                {
                 stage 'Checkout'
                        checkout([
                            $class: 'GitSCM',
                            branches: [[name: '*/master']],
                            extensions: [[
                 $class: 'PathRestriction',
                 excludedRegions: 'CommonAssemblyInfo\\.cs',
                 includedRegions: ''
                 ]],
                            userRemoteConfigs: [[
                                url: 'git@github.com:VirtoCommerce/vc-module-jenkinssample.git']]])
                }
            }}
            As you might see I have an excluded region defined, so changes made to CommonAssemblyInfo.cs don't trigger any builds. However "Branch Indexing" still forces the job to build when I commit changes to "CommonAssemblyInfo.cs". How can I prevent this?

            Btw, the above script works fine in a separate/individual Pipeline Job.
            markewaite Mark Waite made changes -
            Assignee Mark Waite [ markewaite ]
            woland Alexander Siniouguine made changes -
            Component/s github-organization-folder-plugin [ 21427 ]
            Component/s git-plugin [ 15543 ]
            woland Alexander Siniouguine made changes -
            Component/s workflow-multibranch-plugin [ 21465 ]
            woland Alexander Siniouguine made changes -
            Component/s workflow-multibranch-plugin [ 21465 ]
            dvader Darth Vader made changes -
            Link This issue is related to JENKINS-36195 [ JENKINS-36195 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 172625 ] JNJira + In-Review [ 184698 ]
            jglick Jesse Glick made changes -
            Description I have an organizational project configured which scans repositories for jenkinsfile. One of the repository (https://github.com/VirtoCommerce/vc-module-jenkinssample) has a following Jenkinsfile defined:

            {{
                node
                {
                 stage 'Checkout'
                        checkout([
                            $class: 'GitSCM',
                            branches: [[name: '*/master']],
                            extensions: [[
                 $class: 'PathRestriction',
                 excludedRegions: 'CommonAssemblyInfo\\.cs',
                 includedRegions: ''
                 ]],
                            userRemoteConfigs: [[
                                url: 'git@github.com:VirtoCommerce/vc-module-jenkinssample.git']]])
                }
            }}
            As you might see I have an excluded region defined, so changes made to CommonAssemblyInfo.cs don't trigger any builds. However "Branch Indexing" still forces the job to build when I commit changes to "CommonAssemblyInfo.cs". How can I prevent this?

            Btw, the above script works fine in a separate/individual Pipeline Job.
            I have an organizational project configured which scans repositories for jenkinsfile. One of the repository (https://github.com/VirtoCommerce/vc-module-jenkinssample) has a following Jenkinsfile defined:

            {code}
                node
                {
                 stage 'Checkout'
                        checkout([
                            $class: 'GitSCM',
                            branches: [[name: '*/master']],
                            extensions: [[
                 $class: 'PathRestriction',
                 excludedRegions: 'CommonAssemblyInfo\\.cs',
                 includedRegions: ''
                 ]],
                            userRemoteConfigs: [[
                                url: 'git@github.com:VirtoCommerce/vc-module-jenkinssample.git']]])
                }
            {code}

            As you might see I have an excluded region defined, so changes made to CommonAssemblyInfo.cs don't trigger any builds. However "Branch Indexing" still forces the job to build when I commit changes to "CommonAssemblyInfo.cs". How can I prevent this?

            Btw, the above script works fine in a separate/individual Pipeline Job.
            jglick Jesse Glick made changes -
            Component/s branch-api-plugin [ 18621 ]
            Component/s github-organization-folder-plugin [ 21427 ]
            Component/s workflow-multibranch-plugin [ 21465 ]
            jglick Jesse Glick made changes -
            Issue Type Improvement [ 4 ] New Feature [ 2 ]
            Component/s github-branch-source-plugin [ 20858 ]
            Component/s branch-api-plugin [ 18621 ]
            jglick Jesse Glick made changes -
            Component/s branch-api-plugin [ 18621 ]
            Component/s github-branch-source-plugin [ 20858 ]
            jglick Jesse Glick made changes -
            Summary Organization job "Branch Indexing" ignores excluded regions defined in jenkinsfile Equivalent to polling commit exclusions for branch indexing
            krever Wojciech Pituła made changes -
            Attachment workaround.txt [ 38191 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-43842 [ JENKINS-43842 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-44371 [ JENKINS-44371 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "CloudBees-internal mirror (Web Link)" [ 20187 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-27092 [ JENKINS-27092 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "git PR 573 (Web Link)" [ 20188 ]
            leedega Kevin Phillips made changes -
            leedega Kevin Phillips made changes -
            Attachment multibranch_indexing_options.png [ 41758 ]
            nlowe_hyland Nathan Lowe made changes -
            Attachment screenshot-1.png [ 45330 ]
            nlowe_hyland Nathan Lowe made changes -
            Attachment screenshot-2.png [ 45331 ]
            bitwiseman Liam Newman made changes -
            Assignee Liam Newman [ bitwiseman ]
            bitwiseman Liam Newman made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-57164 [ JENKINS-57164 ]
            bitwiseman Liam Newman made changes -
            Link This issue is related to JENKINS-57474 [ JENKINS-57474 ]

              People

              • Assignee:
                bitwiseman Liam Newman
                Reporter:
                woland Alexander Siniouguine
              • Votes:
                32 Vote for this issue
                Watchers:
                39 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: