Skip to content

Add VariableType and variables fields

Avielle Wolfe requested to merge 361934-aw-add-variable-type into master

What does this MR do and why?

  • Adds Ci::VariableType which represents the many types of variables that exist in Gitlab CI
  • Adds ci_variables field to ProjectType, GroupType, and QueryType
  • Includes a raw field in VariableType so we can now surface whether a variable is non-expanded

How to set up and validate locally

Use the following query in GraphQL to check each of the new variable fields:

{
  ciVariables {
    nodes {
      id
      key
      value
      variableType
      raw
      masked
      protected
    }
  }
  group(fullPath: "gitlab-org") {
    ciVariables {
      nodes {
        id
        key
        value
        variableType
        raw
        masked
        protected
      }
    }
  }
  project(fullPath: "gitlab-org/gitlab-test") {
   	ciVariables {
      nodes {
        id
        key
        value
        variableType
        raw
        masked
        protected
      }
    }
  }
}

MR acceptance checklist

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

Related to #361934 (closed)

Edited by Avielle Wolfe

Merge request reports