We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Since I switched to v4 API, the variables I pass to triggers are ignored. Here is a sample of code:
from httplib import HTTPConnection HTTPConnection.debuglevel = 2 my_project.trigger_pipeline('gitlabci', 'XXXXX', {'variables[GITLAB_TEST]': 'ThisIsATest'})
From httplib debug output it's equivalent to:
httplib
curl --request POST https://gitlab.com/api/v4/projects/XXXX/trigger/pipeline -H "Content-Type: application/json" -d '{"token": "XXXXX", "ref": "gitlabci", "variables[GITLAB_TEST]": "ThisIsATest"}'
which also ignore variables. Doing the same without JSON does work:
curl --request POST https://gitlab.com/api/v4/projects/XXXX/trigger/pipeline --form token=XXXXX --form ref=gitlabci --form "variables[GITLAB_TEST]=ThisIsATest"
Would it be possible that Gitlab expect the JSON payload to have an other structure ?
The text was updated successfully, but these errors were encountered:
After some trial I found the valid JSON structure:
{ "token": "XXXXX", "ref": "gitlabci", "variables": {"GITLAB_TEST": "ThisIsATest"} }
Sorry, something went wrong.
Fix trigger variables in v4 API
84d609a
Close python-gitlab#333
Fix trigger variables in v4 API (#334)
ac430a3
Fix trigger variables in v4 API Close #333
No branches or pull requests
Since I switched to v4 API, the variables I pass to triggers are ignored. Here is a sample of code:
From
httplib
debug output it's equivalent to:which also ignore variables. Doing the same without JSON does work:
Would it be possible that Gitlab expect the JSON payload to have an other structure ?
The text was updated successfully, but these errors were encountered: