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

Equivalent to polling commit exclusions for branch indexing

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • branch-api-plugin
    • None
    • Windows

      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.

        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

            bitwiseman Liam Newman
            woland Alexander Siniouguine
            Votes:
            32 Vote for this issue
            Watchers:
            40 Start watching this issue

              Created:
              Updated:
              Resolved: