Last active
March 30, 2023 10:12
-
-
Save alexsplashex/b996054561ebf9e2e234782e88941d8c 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
#!/bin/bash | |
# Jenkins Configuraitons Directory | |
cd $JENKINS_HOME | |
# Add general configurations, job configurations, and user content | |
git add -- *.xml jobs/*/*.xml userContent/* ansible/* | |
# only add user configurations if they exist | |
if [ -d users ]; then | |
user_configs=`ls users/*/config.xml` | |
if [ -n "$user_configs" ]; then | |
git add $user_configs | |
fi | |
fi | |
# mark as deleted anything that's been, well, deleted | |
to_remove=`git status | grep "deleted" | awk '{print $3}'` | |
if [ -n "$to_remove" ]; then | |
git rm --ignore-unmatch $to_remove | |
fi | |
git commit -m "Automated Jenkins commit" | |
git push -q -u origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi , i tried to implement it on Windows Server
and always gets stuck at
had to abort it hour later
our repo is ADO and we use http.sslBackend schannel