Skip to content

Commit c1b7904

Browse files
samrocketmanshiftkey
authored andcommitted
gitignore for JENKINS_HOME Jenkins settings (github#1763)
* gitignore for JENKINS_HOME Jenkins settings This allows an admin to use git to keep a backup of Jenkins settings without tracking binary artifacts. Useful for preserving settings during plugin upgrades. Note: secret.key is purposefully not tracked by git. This should be backed up separately because configs may contain secrets which were encrypted using the secret.key. See also: * http://jenkins-ci.org/ * https://wiki.jenkins-ci.org/display/JENKINS/Administering+Jenkins * Add a few entries to Jenkins gitignore
1 parent 7eef17f commit c1b7904

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

JENKINS_HOME.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#Learn more about Jenkins and JENKINS_HOME directory for which this file is intended.
2+
# http://jenkins-ci.org/
3+
# https://wiki.jenkins-ci.org/display/JENKINS/Administering+Jenkins
4+
5+
#ignore all JENKINS_HOME except jobs directory, root xml config, and .gitignore file
6+
/*
7+
!/jobs
8+
!/.gitignore
9+
!/*.xml
10+
11+
#ignore all files in jobs subdirectories except for folders
12+
#note: git doesn't track folders, only file content
13+
jobs/**
14+
!jobs/**/
15+
16+
#uncomment the following line to save next build numbers with config
17+
#!jobs/**/nextBuildNumber
18+
19+
#exclude only config.xml files in repository subdirectories
20+
!config.xml
21+
22+
#don't track workspaces (when users build on the master)
23+
jobs/**/*workspace
24+
25+
#as a result only settings and job config.xml files in JENKINS_HOME will be tracked by git

0 commit comments

Comments
 (0)