Currently this plugin lets you skip CI builds based on some ignore list kept in Jenkins configuration (BranchBuildStrategy). This has some serious limitations:

      • It is hard to keep an audit trail of changes, unless you also use jobConfigHistory or job-dsl.
      • You need Item.CONFIGURE permission to make changes. For example, on ci.jenkins.io this would mean filing an INFRA ticket and waiting for an overworked administrator to pay attention.
      • In the case of an OrganizationFolder, you can only set safe generic patterns like README.md—there is no way to define per-repository patterns.

      The recommended usage mode should instead be to create a file in the repository itself listing patterns to exclude (or perhaps include). The contents of this file should be read (using SCMFileSystem, a.k.a. "lightweight checkout") in the currRevision, so that you can create an atomic commit which both adds some new file irrelevant to CI and marks it in the ignore list, without triggering a build.

      I would suggest the file name .jenkinsignore by analogy with .gitignore, .dockerignore, etc. For consistency with other Ant PatternSet usages in Jenkins, it can use the same syntax as the current configuration:

      .*
      *.md
      docs/
      images/
      

      though most people would be more familiar with the syntax of .gitignore, if there is some JVM parser available for it.

          [JENKINS-58637] .jenkinsignore

          Igal Gluh added a comment -

          Jesse Hi,

          It's realy good idea.  

          Igal Gluh added a comment - Jesse Hi, It's realy good idea.  

          Igal Gluh added a comment -

          Released

          ver 1.0.9

          Igal Gluh added a comment - Released ver 1.0.9

          Igal Gluh added a comment -

          Jesse Hi,

          Is it solved your problem?  

          Igal Gluh added a comment - Jesse Hi, Is it solved your problem?  

          Jesse Glick added a comment -

          That was fast! https://github.com/jenkinsci/multibranch-build-strategy-extension-plugin/commit/df5033974de58e4f21798621da3e0e136b2bf15c

          I will try it out and see if we can get it running on ci.jenkins.io.

          Jesse Glick added a comment - That was fast! https://github.com/jenkinsci/multibranch-build-strategy-extension-plugin/commit/df5033974de58e4f21798621da3e0e136b2bf15c I will try it out and see if we can get it running on ci.jenkins.io.

          Kyle Leinen added a comment -

          igalg this feature got be really excited as it would solve the same problem for my team that jglick has.

          I've found that while the "Cancel build excluded regions strategy" works without issue, I am unable to get the new "Cancel ci by ignore file strategy" working using a .jenkinsignore file that has the same contents. I think these are valid ANT pattern files, so I'm not sure what I am doing wrong.

          Here is the contents if my .jenkinsignore:

          *.md
          LICENSE
          .gitignore
          .jenkinsignore
          review.conf
          

          I have also tried the following with no success:

          *.md
          /LICENSE
          /.gitignore
          /.jenkinsignore
          /review.conf
          

          Kyle Leinen added a comment - igalg this feature got be really excited as it would solve the same problem for my team that jglick has. I've found that while the "Cancel build excluded regions strategy" works without issue, I am unable to get the new "Cancel ci by ignore file strategy" working using a .jenkinsignore file that has the same contents. I think these are valid ANT pattern files, so I'm not sure what I am doing wrong. Here is the contents if my .jenkinsignore: *.md LICENSE .gitignore .jenkinsignore review.conf I have also tried the following with no success: *.md /LICENSE /.gitignore /.jenkinsignore /review.conf

            igalg Igal Gluh
            jglick Jesse Glick
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: