Skip to content

Add variables support to ci trigger

Problem to solve

We use variables a lot and would like to be able to specify variables when triggering ci jobs. glab ci run has --variables, but this is not supported in glab ci trigger

Proposal

Add variables support to glab ci trigger mirroring glab ci run. This would add the following flags

  • --variables
  • --variables-env
  • --variables-file
  • --variables-from

Further details

Example:

glab ci trigger --variables 'DEBUG:true' 123456

The curl equivalent is:

curl --request POST \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --header "Content-Type: application/json" \
  --data @variables.json \
  --url "https://gitlab.example.com/api/v4/projects/1/jobs/1/play"

Links / references

Edited by Paul Armstrong
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information