Backend: Create CiPipelineVariable Type in GQL and update Ci::Entry::Variables to allow array of values for DEPLOY_ENVIRONMENT rather than single entry

Summary

In 13.7 we made it possible to surface pre-filled variables with values in the "Run pipeline" page. Changing the value is still a manual and error-prone process. The CI users would like to be able to set a list of predefined variable values for CI environment variables to make it easier to run a pipeline with the available variables. The severity of this problem is well documented by multiple customers in the issue discussions below.

Proposal

  • The first value in the values list will be used as the default value, pre-selected in the dropdown

YAML Definition

variables:
  DEPLOY_ENVIRONMENT:
    value: 
      - "staging"  #  staging should appear by default
      - "Production" # Production is the second option in a dropdown list
    description: "The deployment target. Change this variable to 'canary' or 'production' if needed."

Implementation Table

Title MR Link
Create CiConfigVariableType !93387 (merged) workflowin review
Move masked and protected to the types for project, instance, and group variables !93596 (merged) workflowproduction
Update Ci::Entry::Variables DUPES, this one is now closed: !95474 (closed) and this: !95390 (merged) is in workflowin review
Update CiConfigVariableType with options workflowblocked - depends on the MR from the step above

Links/References

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited Aug 16, 2022 by Laura Montemayor
Assignee Loading
Time tracking Loading