Perazim
Perazim

Reputation: 1529

Set post-commit in VisualSVN Server for Jenkins

I connected Jenkins with my VisualSVN Server and can make builds by clicking on the build-button in Jenkins. But now I want to trigger the build by using the post-commit. I use TortoiseSVN + Jenkins + VisualSVN Server

I tried it two ways, but none of them worked for me.

First I read this article page, and used like the author this code:

C:\curl\curl http://admin:123@localhost:8080/jenkins/job/Cannon%20Attack%20-%20Dom%20Millar/build?token=MyAuth

I also tried it without any token and both ways without any login-information

C:\curl\curl http://admin:123@localhost:8080/jenkins/job/Cannon%20Attack%20-%20Dom%20Millar/build?delay=0sec

The second code I tried was from this page:

C:\Repositories\NunitTests\JenkinsNotifier.rb Cannon%20Attack%20-%20Dom%20Millar/

And the JenkinsNotifier.rb contains this code:

# Push a notice to the hudson server to initiate a build.

# Ensure the required libs are present
require "net/http"
require "uri"

# Get the project name
hudsonProject = ARGV[0]

# Create the uri and issue the request
uri = URI.parse("http://localhost:8080/jenkins/job/" + Cannon%20Attack%20-%20Dom%20Millar + "/build?delay=0sec")
Net::HTTP::get_print uri

Error: 1.Way: enter image description here

2.Way: I dont get an error, but the build also doesnt start.

Upvotes: 1

Views: 859

Answers (1)

Perazim
Perazim

Reputation: 1529

I fixed it. It was a syntax problem. Curl doenst accept "%20". I deleted all of them and also deleted the spaces in the project name in jenkins.

"C:\curl\curl" http://localhost:8080/job/CannonAttack-DomMillar/build?token=MyAuth
PAUSE

Upvotes: 1

Related Questions