Skip to content

Draft: Add GraphQL support for job variables

Dependent MR: !117113

What does this MR do and why?

Related issue: #384575

Plan: GitLab Premium

Environment: ~SaaS self-managed

Add a new field variables to the Graphql type CiJob, indicating the variables used in jobs.

Screenshots or screen recordings

No UI changes.

How to set up and validate locally

  1. Visit http://127.0.0.1:3000/-/graphql-explorer
  2. Execute query:
# Adjust `Fullpath` and `id` parameters below according to your local data
# Expected return value: get variables data
{
   project(fullPath: "flightjs/Flight") {
     id
     job(id: "gid://gitlab/Ci::Build/142") {
       id
       name
       variables {
         key
         value
         public
         file
         masked
         raw
       }
     }
   }
}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Zhiyuan Lu

Merge request reports