Skip to content

Instantly share code, notes, and snippets.

View ajit92maharwar's full-sized avatar

ajit92maharwar

View GitHub Profile
@ajit92maharwar
ajit92maharwar / jenkins-git-backup.sh
Created May 17, 2022 08:30 — forked from abayer/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 2 ]; then
echo usage: $0 root_dir jenkins_master