Created
February 3, 2012 21:45
-
-
Save sdqali/1732873 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env bash | |
JENKINS_HOME=/var/lib/jenkins | |
cd $JENKINS_HOME | |
git add *.xml jobs/*/config.xml users/*/config.xml userContent/* | |
CHANGES_TO_BE_COMMITTED=$(git status | grep "^# Changes to be committed:" | wc -l) | |
if [ $CHANGES_TO_BE_COMMITTED -eq 0 ]; then | |
echo "Nothing to commit" | |
else | |
git commit -m "Automated commit of Jenkins configuration at $(date)" | |
git push origin master | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment