Skip to content

Conversation

@leonardola
Copy link

@leonardola leonardola commented Jul 2, 2018

Hello, I've tried using this sdk for starting jobs with parameters but had to modify it to make it work properly. Every time i tried sending parameters they would not appear on jenkins. So I debugged a little and found out that the way the parameters were sent by the library was wrong.

  • First there is no need to use the /buildWithParameters url
  • Second it is needed to send all parameters inside an array like this on curl_postFields
array(
    'json' => json_encode(array(
        "parameter" => $parameters
    )
)

I don't know if an update from jenkins itself broke the integration or if the integration never worked properly. This is just the way I fixed it for me. There is probably a better way for mantaining compatibility. If someone propose it, I will be glad to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant