1.) Jenkins
2.) Artifactory
3.) SVN
Normally nosotros purpose this plugin: https://wiki.jenkins-ci.org/display/JENKINS/Subversion+Plugin, where nosotros edit the svn's post-commit claw too write the next code, but it doesn't hold upward for me :-) (we assume that y'all convey your repositories inwards /var/subversion):
#!/bin/sh REPOS="$1" REV="$2" UUID=`svnlook uuid $REPOS` /usr/bin/wget \ --header "Content-Type:text/plain;charset=UTF-8" \ --post-data "'svnlook changed --revision $REV $REPOS'" \ --output-document "-" \ --timeout=2 \ http://localhost:8080/subversion/${UUID}/notifyCommit?rev=$REV
To examination if your ship service commit is working y'all tin temporarily modify it's contents into:
#!/bin/sh /bin/echo "$REPOS $REV $UUID" >> /var/subversion/svn-post-commit.out
To telephone vociferation upward the subversion jenkins plugin usually this should hold upward (but it likewise did non :-))
curl --data "rev=4" http://localhost:8080/subversion/c8bb87ec-9a19-4975-ab9d-8b15741e6d7e/notifyCommit
Check if a file is created too has content in: /var/subversion/svn-post-commit.out
So what worked for me? I simply manually invoke jenkins's cli.jar. So I changed the post-commit content into:
#!/bin/sh /usr/bin/java -jar /usr/share/jenkins/cli/java/cli.jar -s http://localhost:8080/ construct yourProject
*Note: Make certain that www-data user has permission to execute cli.jar.
0 komentar:
Please comment if there are any that need to be asked.