email - jenkins svn mail to committer after post-commit and revert commit -
i trying setup jenkins , svn project. jenkins , svn running already. have post-commit hook starts build everytime new commit comes in. jenkins secured jenkins own user directory
, enabled registrations. have activated matrix-based security
.
have following scenario:
whenever developer commits, post-commit
script called , build+tests starts. whenever build fails developer did commit shall receive email informations why commit failed. commit should reverted in repo. reverting thingy have installed revert plugin
, activated project. seems not working, because nothing happened repo after did test-commit lead build fail. maybe miss jenkins+svn configuration? know revertig commits not best practice, have valid build in repo test/demo. post-commot
file looks this:
#!/bin/bash repos="$1" rev="$2" uuid=`svnlook uuid $repos` /usr/bin/wget \ --http-user="user" \ --http-passwd="psswd" \ --header "content-type:text/plain;charset=utf-8" \ --post-data "`svnlook changed --revision $rev $repos`" \ --output-document "-" \ --timeout=2 \ http://ip/jenkins/subversion/${uuid}/notifycommit?rev=$rev
this script working, can see user+password hardcoded. not know how else provide authentifaction informations jenkins. maybe have logical problem, since every developer needs not fresh checkout + account repo, account on jenkins whole idea working?
Comments
Post a Comment