subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dieter Guthmann" <d.guthm...@gmx.net>
Subject "SVN Commit hook failed" frequently
Date Wed, 06 Jul 2016 09:37:32 GMT
<html><head></head><body><div style="font-family: Verdana;font-size:
12.0px;"><div>Hello there,</div>

<div>&nbsp;</div>

<div>we use mod_dav_svn 1.8.14 with Apache 2.2.22 for our repositories.</div>

<div>For all repositories a post-commit-hook is installed which triggers jenkins builds.</div>

<div>&nbsp;</div>

<div>The script hasn&#39;t been changed for years, and the post commit hook script
works well most of the time.</div>

<div>But frequently after the apache-server is running a few days without restart, the
post commit hook-script won&#39;t be triggered any more.</div>

<div>Restarting the apache-process resolves the problem temporarily.</div>

<div>&nbsp;</div>

<div>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):</div>

<div>
<div>hooks/post-commit -&gt; ../../../svnhook_jenkins_notifyCommit.sh</div>

<div>&nbsp;</div>

<div>I suppose that the script isn&#39;t called any more, because the &#39;echo&#39;
statement at line 5 doesn&#39;t lead to additional lines in the mentioned logfile.</div>

<div>Below you can find our post-commit-hook-script.</div>

<div>Is there a posibility to get additional logging information about hook-calling?</div>

<div>Any other ideas?</div>

<div>Thanksi in Advance.</div>

<div>&nbsp;</div>

<div>Rgds</div>

<div>Dieter</div>

<div>&nbsp;</div>

<div>&nbsp;</div>

<div>&nbsp;</div>

<div>&nbsp;</div>

<div>==== content of svnhook_jenkins_notifyCommit.sh:</div>

<div>
<div>#!/bin/sh<br/>
#<br/>
REPOS=&quot;&#36;1&quot;<br/>
REV=&quot;&#36;2&quot;</div>

<div>echo &quot;Script run &#36;(date) - &#36;REPOS - &#36;REV&quot;
&gt;&gt; /tmp/svnhook_jenkins_notifyCommit.console.log</div>

<div>UUID=&#96;svnlook uuid &#36;{REPOS}&#96;<br/>
HOST=jenkins.domain.com</div>

<div>/usr/bin/wget &#92;<br/>
&nbsp; --header &quot;Content-Type:text/plain;charset=UTF-8&quot; &#92;<br/>
&nbsp; --post-data &quot;&#96;svnlook changed --revision &#36;{REV} &#36;{REPOS}&#96;&quot;
&#92;<br/>
&nbsp; --output-document &quot;-&quot; &#92;<br/>
&nbsp; --timeout=2 &#92;<br/>
&nbsp; --tries=3 &#92;<br/>
&nbsp; --auth-no-challenge --http-user=itriggerbuilds --http-password=password &#92;<br/>
&nbsp; --append-output=/tmp/svnhook_jenkins_notifyCommit.wget.log &#92;<br/>
&nbsp; http://&#36;{HOST}/subversion/&#36;{UUID}/notifyCommit?rev=&#36;{REV}
2&gt;&amp;1 &amp;</div>

<div>&nbsp;</div>
</div>
</div></div></body></html>

Mime
View raw message