Can't post file to paramaterised build

16 views
Skip to first unread message

Beau Henderson

unread,
Jun 6, 2016, 2:01:35 AM6/6/16
to Jenkins Users
Hello,

I'm trying to kick off a build that will process a .csv. I can manually kick this off without issue from within the Jenkins interface but I'm having trouble kicking it off remotely. Here's my curl command:

curl -H "Content-Length: 29563" -H "Content-Type: multipart/form-data" --form name=tmp-data --form file0=@/Users/XXX/Desktop/XXX.csv -Fjson='{"parameter": {"name": "name", "file": "file0"}}' -Fsubmit=Build  https://ci.exampleurl.com/view/data-imports/job/ESX-VMware-Imports/build?token=SeCreTtoKenGo3sHer3

This keeps returning a 404. The token is correct. I've tried many variants of the above as well as posting to buildWithParameters but same result.

Any insight you folks might be able to shed would be appreciated!

Thanks.

Daniel Beck

unread,
Jun 6, 2016, 1:13:19 PM6/6/16
to jenkins...@googlegroups.com

> On 06.06.2016, at 08:01, Beau Henderson <b.hen...@uq.edu.au> wrote:
>
> Any insight you folks might be able to shed would be appreciated!

Unless the anonymous user has read access to your job, you need to do Basic authentication.

Beau Henderson

unread,
Jun 6, 2016, 6:06:04 PM6/6/16
to Jenkins Users
Brilliant. Thanks!
Reply all
Reply to author
Forward
0 new messages