Support passing inputs with glab ci run
and glab ci run-trig
Problem to solve
As a DevOps Engineer, I want trigger a pipeline from another pipeline using CI_JOB_TOKEN
, while passing CI/CD inputs. The parent pipeline is wrapped in a container, so I cannot use the trigger YAML keyword, but must trigger the child pipeline either using glab or curl.
Proposal
GitLab Pipeline and Pipeline Trigger APIs support passing inputs alongside variables. This feature has been generally available since version 18.1. Please consider adding support for inputs to the glab ci run
and glab ci run-trig
commands. Currently, users must either use glab api
or avoid using glab
altogether. Passing inputs with glab api
is not only cumbersome but also buggy when using the Pipeline Trigger API (endpoint expects multipart form data not JSON).
Further details
This would require adding support to gitlab-org/api/client-go> first. See gitlab-org/api/client-go#2154 (closed)