(replies inline) On Tue, 15 May 2018, jack wrote:
> Hi everyone, > > I'm recently working on this automation solution for my dev team using SVN > as version control, to run builds and tests automatically when a commit > occurs. > > But each time when I commit my post-commit hook script fails me :/ > > post-commit hook failed (exit code 127) with output: > /url/to/our/svnServer/hooks/post-commit: 67: --post-data: not found (which > is odd : the --post-data line is not at line 67 which is the last line of > the file) > > I'm not able to find the exact same problem on the web so no solution > found... My script looks like this (the same script from the official doc): > > > > REPOS="$1" > REV="$2" > > #path to svnlook > UUID=`svnlook uuid $REPOS` > > #notifying jenkins for repository change > /usr/bin/wget \ > --header `wget -q --output-document - \ > > 'http://my_jenkins_url/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)'` > --post-data "`svnlook changed --revision $REV $REPOS`" \ > --timeout=2 \ > http://my_jenkins_url:/subversion/${UUID}/notifyCommit?rev=$REV While this isn't a Jenkins issue at all, I'll give ya a hand :) There's a trailing \ character which is missing after the crumbIssuer line in the script, causing the script interpreter to try to parse the next line as if it were a new command (`--post-data`) -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/20180516141729.GE3395%40grape.lasagna.io. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: PGP signature
