Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-38658

File parameters are ignored


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins ver. 1.625.3
      build-token-root v1.4

      I'm trying to trigger a job configured to accept a file parameter named dist.
      Triggering this job works fine from the Jenkins web UI and curl (if I provide user:token credentials).
      POSTing to /buildByToken/buildWithParameters?token=... with the same form data triggers a build, but no matter what I try the file isn't passed on to the job.


      curl -X POST "https://.../job/.../build?token=..." \
      --user user:api-token \
      -F file0=@$(shell pwd)/dist.json \
      -F json='{"parameter": [{"name": "dist", "file": "file0"}]}'

      Doesn't work:

      curl -X POST "https://.../buildByToken/buildWithParameters?job=job&token=..." \
      -F file0=@$(shell pwd)/dist.json \
      -F json='{"parameter": [{"name": "dist", "file": "file0"}]}'

      The issue might be related to the fact that Jenkins seemed to ignore the file when I POSTed to /buildWithParameters, it only worked when posting to /build.

      Thanks in advance!

            Unassigned Unassigned
            victorha Victor Hallberg
            2 Vote for this issue
            5 Start watching this issue