"SVN Commit hook failed" frequently
From: Dieter Guthmann <d.guthmann_at_gmx.net>
Date: Wed, 6 Jul 2016 11:37:32 +0200 Hello there,
we use mod_dav_svn 1.8.14 with Apache 2.2.22 for our repositories.
For all repositories a post-commit-hook is installed which triggers jenkins builds.
The script hasn't been changed for years, and the post commit hook script works well most of the time.
But frequently after the apache-server is running a few days without restart, the post commit hook-script won't be triggered any more.
Restarting the apache-process resolves the problem temporarily.
The post-commit-hook script is placed outside the repos-directory and is owned by the apache-User (with r-x-Rights). In all repositories a symbolic link is placed (the link is also owned by the www-data-User):
hooks/post-commit -> ../../../svnhook_jenkins_notifyCommit.sh
I suppose that the script isn't called any more, because the 'echo' statement at line 5 doesn't lead to additional lines in the mentioned logfile.
Below you can find our post-commit-hook-script.
Is there a posibility to get additional logging information about hook-calling?
Any other ideas?
Thanksi in Advance.
Rgds
Dieter
==== content of svnhook_jenkins_notifyCommit.sh:
#!/bin/sh
# REPOS="$1" REV="$2" echo "Script run $(date) - $REPOS - $REV" >> /tmp/svnhook_jenkins_notifyCommit.console.log
UUID=`svnlook uuid ${REPOS}`
HOST=jenkins.domain.com /usr/bin/wget \
--header "Content-Type:text/plain;charset=UTF-8" \ --post-data "`svnlook changed --revision ${REV} ${REPOS}`" \ --output-document "-" \ --timeout=2 \ --tries=3 \ --auth-no-challenge --http-user=itriggerbuilds --http-password=password \ --append-output=/tmp/svnhook_jenkins_notifyCommit.wget.log \ http://${HOST}/subversion/${UUID}/notifyCommit?rev=${REV} 2>&1 & |
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.