Skip to content

Add GraphQL query for inherited CI variables

Mireya Andres requested to merge add-graphql-for-inherited-ci-vars into master

What does this MR do and why?

Main issue: #222367 (closed)

This returns the CI variables a project inherits from its parent and ancestor groups. The query will be used for showing the inherited CI variables in the project's CI/CD settings (which is an existing table that will be migrated to vue in !119026 (merged)).

Screenshots or screen recordings

Screenshot_2023-05-03_at_16.44.39

How to set up and validate locally

  1. Tests should pass.
  2. You can use the following query to test in graphiql.
Sample query
query getInheritedCiVariables {
  project(fullPath: "group/project") {
    id
    inheritedCiVariables {
      __typename
      nodes {
        id
        variableType
        environmentScope
        masked
        protected
        raw
        groupName
        groupCiCdSettingsPath
        __typename
      }
    }
  }
}

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 Mireya Andres

Merge request reports