Skip to content

Add GraphQL mutation to trigger pipeline variables migration

What does this MR do and why?

Add GraphQL mutation to trigger pipeline variables migration

Introduces SafeDisablePipelineVariables mutation that allows group administrators to trigger the migration of pipeline variables to CI/CD settings. The mutation enqueues the existing worker and returns success status with any errors.

  • Add SafeDisablePipelineVariables GraphQL mutation
  • Register mutation in MutationType
  • Add comprehensive test coverage for authorization and error handling
  • Restrict access to group administrators only

References

Add self-service migration to block use of pipe... (#514242 - closed)

How to set up and validate locally

  1. Open the Project's CI/CD settings and the variables tab to see Minimum role to use pipeline variables current value.
  2. Use the mutation -
mutation SafeDisablePipelineVariables($fullPath: ID!) {
  safeDisablePipelineVariables(input: { fullPath: $fullPath }) {
    success
    errors
  }
}

and variables -

{
  "fullPath": "group_name"
}
  1. See the value get updated after the background migration is run.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #514242 (closed)

Merge request reports

Loading