Add keyword to CI config for CI job inputs

What does this MR do and why?

This MR introduces the inputs keyword for jobs.

  • It adds a JobInput entry class that requires default values for job inputs
  • It adds inputs support to Entry::Job entry with Ci::Inputs::Builder validation
  • It updates the CI JSON schema with jobInputs. It extracts baseInput JSON schema validations for use in configInputs and jobInputs
  • It extracts a BaseInput module for shared input config validation logic

All of this work is done behind the new ci_job_inputs WIP feature flag

Issue: Add keyword to CI config for CI job inputs (#547440)

Spike MR: Draft: Spike: Implement CI job inputs keyword (!202106 - closed)

How to set up and validate locally

🌟 Enable the ci_job_inputs flag! 🌟

Here's a good config to use for testing:

test-job-inputs:
    inputs:
        test_string:
            default: "hello i am a string"
        test_boolean:
            default: true
            type: boolean
        test_number:
            default: 666
            type: number
        test_array:
            default: ["item 1", "item 2"]
            type: array
    script:
        - echo "Processing script"
        - echo "${{ inputs.test_string }}"
        - echo "${{ inputs.test_boolean }}"
        - echo "${{ inputs.test_number }}"
        - echo "${{ inputs.test_array }}"
    tags:
        - job-inputs

If you place this config in the CI editor, you should see that it's valid:

Screenshot 2025-10-29 at 15.04.23.png

Inputs with no default value should be invalid:

Screenshot 2025-10-29 at 15.08.39.png

Errors should be surfaced properly for other invalid inputs:

Screenshot 2025-10-29 at 15.09.42.png

If you run a pipeline with the config, you should see that it gets saved in the job's options:

Screenshot 2025-10-29 at 15.11.19.png

Testing this further requires setting up the Runner PoC for job inputs. Follow the instructions in Draft: POC: Expand job inputs into the user script (gitlab-runner!5600 - closed).

Note: I don't expect reviewers to do this, but if you want to please ask me for further instructions

Edited by Avielle Wolfe

Merge request reports

Loading