Cannot pass variable to the job of pipeline by using trigger api
I triggered pipeline well by below script. And variables are passed.
Everything is ok.
curl -X POST \
-H "Content-Type: multipart/form-data" \
-F token=TOKEN \
-F ref=master \
-F variables[ENVIRONMENT]=production \
-F variables[ACTION]=release \
https://gitlab.com/api/v4/projects/7151700/trigger/pipeline
But now for some reasons. I have to trigger by using json body
Description of the problem
Using Content-Type: application/json
triggered is successed
curl -X POST \
-H "Content-Type: application/json" \
-d '{"token":"TOKEN", "ref":"master", "variables[ENVIRONMENT]": "production", "variables[ACTION]": "release"}' \
https://gitlab.com/api/v4/projects/7151700/trigger/pipeline
variables is not passed
Which Group/Project (with full path) is experiencing the issue?
https://gitlab.com/bruce0205/ci-test/pipelines
Approximate date/time when the error occurred.
2018-06-20T06:37:53.573Z
Describe what you were doing right before the issue occurred.
trigger pipeline