[JIRA] (JENKINS-58637) .jenkinsignore

11 views
Skip to first unread message

jglick@cloudbees.com (JIRA)

unread,
Jul 24, 2019, 6:08:02 AM7/24/19
to jenkinsc...@googlegroups.com
Jesse Glick created an issue
 
Jenkins / New Feature JENKINS-58637
.jenkinsignore
Issue Type: New Feature New Feature
Assignee: Igal Gluh
Components: multibranch-build-strategy-extension-plugin
Created: 2019-07-24 10:07
Priority: Major Major
Reporter: Jesse Glick

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.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

igal.gluh@gmail.com (JIRA)

unread,
Jul 24, 2019, 2:30:01 PM7/24/19
to jenkinsc...@googlegroups.com
Igal Gluh commented on New Feature JENKINS-58637
 
Re: .jenkinsignore

Jesse Hi,

It's realy good idea.  

igal.gluh@gmail.com (JIRA)

unread,
Jul 24, 2019, 5:55:01 PM7/24/19
to jenkinsc...@googlegroups.com
 
Re: .jenkinsignore

Released

ver 1.0.9

igal.gluh@gmail.com (JIRA)

unread,
Jul 25, 2019, 1:55:02 PM7/25/19
to jenkinsc...@googlegroups.com
 
Re: .jenkinsignore

Jesse Hi,

Is it solved your problem?  

jglick@cloudbees.com (JIRA)

unread,
Jul 25, 2019, 3:49:02 PM7/25/19
to jenkinsc...@googlegroups.com

kleinen@gmail.com (JIRA)

unread,
Jan 8, 2020, 11:42:02 AM1/8/20
to jenkinsc...@googlegroups.com
Kyle Leinen commented on New Feature JENKINS-58637
 
Re: .jenkinsignore

Igal Gluh this feature got be really excited as it would solve the same problem for my team that Jesse Glick 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
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages