Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix params sending for job execution #55

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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