On Monday, July 31, 2017 at 7:21:08 AM UTC+8, mpapo - Michael Pailloncy 
wrote:
>
>
>> I tried it and it is asking for mode? I am not sure what is the mode I 
>> should provide for creating new job. I tried passing  mode=create and it 
>> did not work.
>>
>
> Can you share the command line which you've tried please ?
>

I planned to first try in GUI: 
http://<Jenkins-URL>:8080/createItem?name=testjob it gave me error that 
please specify a valid mode. Then I changed it to name=testjob & 
mode=create but it still did not work.

curl -v -X POST 
http://<username>:<jenkins-pass>@<Machine-IP>:8080/createItem?name=newjob  
–user <username>:<API-Token> --data-urlencode json='{"parameter": 
[{"name":"id", "value":"123"}, {"name":"verbosity", "value":"high"}]}'

Can you please help here in this regard? 

>  
>
>>
>>> However, what do you mean by "for creating jobs based on a specific 
>>> build" ?
>>>
>>
>> I mean the new job should "execute shell" to package local packages. I 
>> guess that I can achieve with the buildWithParameters and by passing the 
>> command. If  you have any example could you please let me know.
>>
>
> You can find an example of a build trigger with parameters from command 
> line here 
> <https://wiki.jenkins.io/display/jenkins/remote+access+api#RemoteaccessAPI-Submittingjobs>
> .
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c8f8ba34-8af7-4a5a-8de6-b98f88b821c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to