Add `manual_variables` field to `JobType`
What does this MR do and why?
This MR adds a manual_variables
field to JobType
, which returns the variables given to a manual job when it is triggered by a user. Builds that are not manual will always have an empty collection for this field. Bridges will have null
.
How to set up and validate locally
-
Create a pipeline with a manual job
manual_job: script: - echo "I am manual" when: manual
-
Run the pipeline and go to the job's page. Do not trigger the job from the pipeline graph
-
Add a variable using the form on the page, and then run the job
-
Go to
/-/graphql-explorer
and run this query:{ project(fullPath: "PROJECT_PATH") { pipeline(id: "PIPELINE_ID") { jobs { nodes { manualVariables { key value } } } } } }
-
See that your variable is present in the return with the correct key and value
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #361236 (closed)
Edited by Avielle Wolfe