0 votes
ago in Education by (1.7m points)
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:[email protected]: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:[email protected]: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:

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

JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
ago by (1.7m points)
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