Skip to content

Commit 1a409ca

Browse files
committed
Docker runner only commit if there's changes
1 parent 35c76a5 commit 1a409ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packaging/docker/run.sh.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ fi
9191
git config --local --get user.name || git config user.name "${JENKINS_GIT_USER}"
9292
git config --local --get user.email || git config user.email "${JENKINS_GIT_EMAIL}"
9393
git add -A
94-
git commit -m 'pre-start checkpoint commit saving configs'
94+
#commit only if changes exist
95+
git diff-index --quiet HEAD || git commit -m 'pre-start checkpoint commit saving configs'
9596

9697
#save the current version of the bootstrapper to JENKINS_HOME on startup
9798
echo "Overwriting manifest in '${JENKINS_HOME}/plugins/@@MANIFEST@@'."

0 commit comments

Comments
 (0)