Reputation: 99
I'm trying to trigger build in Jenkins remotely using URL. the URL is : "http://myJenkinsURL/job/myProjectName/build?token=SOME_TOKEN&EXTID=lkjsdfljsdflkjsdfjklsdflkj"
The problem is when i try to trigger this build it redirect me to my Jenkins and ask me to insert the parameter but i already passed it over the URL.
Is there something that I'm missing in the process?
Upvotes: 3
Views: 14146
Reputation: 14037
https://wiki.jenkins.io/display/JENKINS/Parameterized+Build has the gory, but it mentions that you want a URL like this (note buildWithParameters):
http://server/job/myjob/buildWithParameters?token=TOKEN&PARAMETER=Value
so your call might look like this:
curl -X POST "http://myJenkinsURL/job/myProjectName/buildWithParameters?token=SOME_TOKEN&EXTID=lkjsdfljsdflkjsdfjklsdflkj"
Upvotes: 9