jenkinsci / jenkinsci/parameterized-trigger-plugin
[JENKINS-30217] The response of building parametered build via remote api is broken
- Dominant language
- Java
- Stars
- 77
- Forks
- 174
- Avg merge
- 22h 27m
- Merged PRs (30d)
- 1
Description
When triggering a new build without parameters via remote api, we can get a the queued item url for retrieving the build detail later. It works fine.
➜ rest git:(master) curl -X POST "http://localhost:8080/job/TestBuildWithoutParameter/build" -D -
HTTP/1.1 201 Created
X-Content-Type-Options: nosniff
Location: http://localhost:8080/queue/item/5/
Content-Length: 0
Server: Jetty(winstone-2.8)
However the Location header won't return the queued item url when triggering a build with parameters via remote api. There is no way to make sure we can retrieve the build detail information.
➜ rest git:(master) curl -X POST "http://localhost:8080/job/TestBuildWithParameter/build" --data-urlencode json='{"parameter": [
{"name": "abc", "value": "123"}
]}' -D -
HTTP/1.1 201 Created
X-Content-Type-Options: nosniff
Location: http://localhost:8080/job/TestBuildWithParameter/
Content-Length: 0
Server: Jetty(winstone-2.8)
---
Originally reported by
zxkane, imported from: The response of building parametered build via remote api is broken
Raw content of original issue
When triggering a new build without parameters via remote api, we can get a the queued item url for retrieving the build detail later. It works fine.
➜ rest git:(master) curl -X POST "http://localhost:8080/job/TestBuildWithoutParameter/build" -D -
HTTP/1.1 201 Created
X-Content-Type-Options: nosniff
Location: http://localhost:8080/queue/item/5/
Content-Length: 0
Server: Jetty(winstone-2.8)
However the Location header won't return the queued item url when triggering a build with parameters via remote api. There is no way to make sure we can retrieve the build detail information.
➜ rest git:(master) curl -X POST "http://localhost:8080/job/TestBuildWithParameter/build" --data-urlencode json='{"parameter": [
{"name": "abc", "value": "123"}]}' -D -
HTTP/1.1 201 Created
X-Content-Type-Options: nosniff
Location: http://localhost:8080/job/TestBuildWithParameter/
Content-Length: 0
Server: Jetty(winstone-2.8)
- environment:
in both 1.627(without plugin) and 1.609.2
Contributor guide
Assessment
This issue has not been assessed yet.