[go: up one dir, main page]

Skip to content

Add job inputs to runner payload

What does this MR do and why?

This MR is the second step in the job inputs implementation. Job inputs are fetched from the database and structured so that Runner can evaluate their uses in CI runtime expressions.

Note: Job input specs are stored in the ci_builds options field, and their values are stored in the ci_job_inputs table. If an input spec has no corresponding value, the value defined in default is given to Runner.

Changelog: added

Issue: Add job inputs to job payload for runner (#543972 - closed)

How to set up and validate locally

It's challenging to validate this locally because you need to use an experimental binary for Runner from Draft: POC: Expand job inputs into the user script (gitlab-runner!5600 - closed). I've done that and verified that we get the expected results:

I used this CI config:

test-job-inputs:
    script:
        - echo "Processing script"
        - echo "${{ inputs.test_string }}"
    tags:
        - job-inputs

And added inputs to the job using the Rails console:

job.options[:inputs] = { test_string: { input_type: 'string', default: 'kitty kitty' } }

The Runner binary was able to receive the inputs and interpolate them as expected:

Screenshot 2025-07-29 at 16.18.56.png

Edited by Avielle Wolfe

Merge request reports

Loading