Skip to content

Instantly share code, notes, and snippets.

View hazzim's full-sized avatar
⛩️
Scripting...

Hazzim Anaya hazzim

⛩️
Scripting...
View GitHub Profile
@hazzim
hazzim / jenkins-git-backup.sh
Created June 28, 2016 21:20 — forked from choldrim/jenkins-git-backup.sh
Example of a script for backing up Jenkins config in git.
#!/bin/bash
# Copies certain kinds of known files and directories from a given Jenkins master directory
# into a git repo, removing any old ones, adds 'em, commits 'em, pushes 'em.
set -ex
if [ $# -ne 3 ]; then
echo usage: $0 jenkins_home git_repos_url git_repos_name
exit 1
fi