-
Notifications
You must be signed in to change notification settings - Fork 83.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gitignore for JENKINS_HOME Jenkins settings #1763
Conversation
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
This has been working well for me. I've been using it to version control configs for different slaves |
Awesome :). I also use a dailycommit.sh script in a cron job so that it regularly takes a snapshot of the commits. https://gist.github.com/samrocketman/9391439 |
Is there any interest in merging this? |
@shiftkey mind taking a look at this again? |
@samrocketman What about the config-history folder? Should that be ignored by default? I think anything that is either a binary or contains credentials should be ignore too (next build numbers are optional, which I like) Is there anything else like config-history that could be useful? |
config-history folder is added by a Jenkins plugin so should not be included by default. I don’t typically see it installed though I know people use it. Should be straight forward to add an entry after getting this one. binaries are already ignored. Credentials are strongly encrypted so as long as you back up Note: the default gitignore does not track the secret files which are used in conjunction with |
@Stargator I just realized this config does not omit |
@Stargator correction I was confused. It already does not track |
@samrocketman @Stargator @stephengroat thanks for working through the details! |
Thanks for your time @shiftkey ! |
* 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
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 thesecret.key
.See also: