How do I migrate GitLab compliance pipelines before GitLab 20.0?

By Melih Toksari, developer of MergeBell · Updated · 5 min read

Short answer

Open your group's Compliance center, edit the compliance framework, and select Migrate pipeline to a policy in the banner: GitLab creates a pipeline execution policy from it. Then edit the framework again to remove the compliance pipeline. Compliance pipelines were deprecated in GitLab 17.3 and are scheduled for removal in GitLab 20.0 (May 2027) as a breaking change.

If a compliance framework in your group still points at a file like .compliance-gitlab-ci.yml@my-group/compliance, it has a deadline. GitLab deprecated compliance pipelines in GitLab 17.3 (August 2024), and the deprecations page lists their removal under GitLab 20.0, planned for May 2027, as a breaking change. The replacement is the pipeline execution policy. GitLab has a one-click migration, but a few settings decide whether your jobs behave the same afterwards. This guide follows the GitLab docs as of 20 November 2026.

One line further down the compliance pipelines page still says removal “in GitLab 19.0”. The page’s own banner and the deprecations page both say 20.0, and the current docs still document the feature as working, so plan for 20.0, but don’t leave it to the last month.

What replaces compliance pipelines?

Pipeline execution policies. A compliance pipeline replaced a labeled project’s .gitlab-ci.yml with a central file, which then had to include the project’s own configuration back in. A pipeline execution policy keeps the project pipeline and merges jobs from a separate YAML file into it, or replaces it on purpose if you choose that strategy. Both are Ultimate features.

What you did with a compliance pipeline How a pipeline execution policy does it
Framework points at path/file.yml@group/project Policy content.include points at project + file (and an optional ref)
Runs instead of the project’s .gitlab-ci.yml override_project_ci strategy, or inject_policy to keep project jobs and add yours
include:project with $CI_PROJECT_PATH to run project jobs Not needed with inject_policy; possible with override_project_ci
Custom stages like pre-compliance Reserved stages .pipeline-policy-pre and .pipeline-policy-post, or your own stages
Variables set in the compliance job can’t be changed Policy variables win by default; tune with variables_override
Applies to projects with the framework label policy_scope by projects, groups or compliance framework labels

How do I run the migration?

GitLab migrates a framework for you:

  1. In the top bar, select Search or go to and find your group.
  2. In the left sidebar, select Secure › Compliance center.
  3. Edit the compliance framework that has the compliance pipeline.
  4. In the banner, select Migrate pipeline to a policy. GitLab creates a new policy in your security policies.
  5. Edit the framework again and remove the compliance pipeline.

Do step 5. GitLab warns that when a project has both a compliance pipeline and a pipeline execution policy, the compliance pipeline replaces the project pipeline while the policy is applied to the original one. The docs call the result unpredictable: duplicated jobs, failed pipelines, or compliance checks that silently don’t run.

Why do I get “Job names must be unique” after migrating?

The error reads:

Pipeline execution policy error: Job names must be unique

A compliance pipeline had to pull the project’s jobs in itself, usually with this block at the top:

include:
  - project: '$CI_PROJECT_PATH'
    file: '$CI_CONFIG_PATH'
    ref: '$CI_COMMIT_SHA'

A pipeline execution policy already merges its jobs with the project pipeline, so that include declares every project job a second time. Remove include.project from the YAML file the policy links to. What’s left should be only your compliance jobs.

Which pipeline_config_strategy should I pick?

  • inject_policy adds the policy’s jobs and stages to the existing project pipeline. The project can’t override anything the policy defines, because each pipeline has its own isolated YAML. Pick this when your compliance pipeline was mostly “project jobs plus a few required checks”, which is what the old example configuration did.
  • override_project_ci replaces the project configuration with the policy’s. It takes precedence over other policies that inject. If you still want the project’s jobs, include the project configuration in the policy file with include:project, ideally guarded by rules:exists so projects without a .gitlab-ci.yml don’t fail.
  • inject_ci was deprecated in GitLab 17.9. Don’t migrate onto it; use inject_policy.

What does the policy YAML look like?

The policy lives in a security policy project. This shape follows the schema in the docs:

pipeline_execution_policy:
  - name: Compliance jobs
    description: Replaces the compliance pipeline of the SOX framework
    enabled: true
    pipeline_config_strategy: inject_policy
    content:
      include:
        - project: my-group/compliance-project
          file: compliance-pipeline.yml

And the file it points to holds only your jobs. Put the must-run checks in the reserved pre stage:

# compliance-pipeline.yml
compliance:secrets-gate:
  stage: .pipeline-policy-pre
  script:
    - ./run-compliance-checks.sh

Jobs in .pipeline-policy-pre always run, and nothing else in the pipeline starts until that stage finishes. If it fails, or all its jobs are skipped, later jobs are skipped too, including jobs with needs: [] or when: always.

Prefix job names (compliance:…). There is no visible marker that a job came from a policy, and on a name clash GitLab appends a suffix such as sast:policy-123456-0 by default, or fails the pipeline if the policy sets suffix: never.

Migration checklist

  • List every compliance framework with a compliance pipeline in Secure › Compliance center.
  • Migrate each with Migrate pipeline to a policy, then remove the compliance pipeline from the framework.
  • Delete include.project blocks from the policy’s YAML file.
  • Choose inject_policy or override_project_ci deliberately; replace any inject_ci.
  • Move ordering stages like pre-compliance to .pipeline-policy-pre / .pipeline-policy-post, or declare stages explicitly so they line up with projects.
  • Check access: users who trigger pipelines need read access to the policy’s CI file, or enable Pipeline execution policies in the security policy project’s general settings (GitLab 17.4 and later).
  • Count policies: by default GitLab evaluates only the first five enabled policies per security policy project (an administrator can raise it to 20) and silently ignores the rest.
  • Decide on skip_ci: by default [skip ci] is ignored for pipelines with a policy.
  • Run a pipeline in one labeled project and compare its jobs with the last compliance pipeline run.

What else changes for developers?

Three things tend to surprise people after the switch:

  • [skip ci] stops skipping. Unless the policy’s skip_ci allows it, the directive is ignored, so the policy jobs still run. The same goes for no_pipeline.
  • Stage order can fail the pipeline. If the policy’s stages and the project’s stages are in conflicting orders, the pipeline fails with Cyclic dependencies detected when enforcing policies. Define stages explicitly in the policy, or use only the reserved stages.
  • Variables behave differently. By default, variables defined in the policy take the highest precedence and project or group variables can’t override them. Use variables_override with allowed: false and an exceptions list to let teams set the few variables they need.

Child pipelines are a fourth case: policies aren’t enforced in them unless you set enforce_on_child_pipelines: true on the policy.

After the migration, policy jobs show up in the project’s normal pipeline, so you watch them like any other job. In MergeBell, pipelines list their jobs grouped by stage, with the job log tail and retry, cancel and play manual on the free tier, which is enough to see whether a .pipeline-policy-pre gate is what’s holding a merge request back. For a policy that blocks a pipeline outright, GitLab “Pipeline will not run for the selected trigger” covers the rules side, and how to skip a GitLab CI pipeline explains when [skip ci] still works.

Frequently asked questions

When are GitLab compliance pipelines removed?

GitLab's deprecations page lists compliance pipelines under GitLab 20.0, planned for May 2027, as a breaking change. They were deprecated in GitLab 17.3 (August 2024). Until 20.0 they keep working, but new compliance frameworks already steer you to pipeline execution policies.

Is there an automatic migration from compliance pipelines?

Yes. In the group, go to Secure > Compliance center, edit the compliance framework, and select Migrate pipeline to a policy in the banner. GitLab creates a new pipeline execution policy in your security policies. Then edit the framework again to remove the compliance pipeline.

How do I fix "Pipeline execution policy error: Job names must be unique"?

Remove include.project from the YAML file the pipeline execution policy links to. A compliance pipeline had to include the project's .gitlab-ci.yml itself; a pipeline execution policy already merges with the project pipeline, so including it again declares the same jobs twice.

Can I use compliance pipelines and pipeline execution policies together?

Not on the same project. GitLab warns that when both are configured, the compliance pipeline replaces the project pipeline while the policy applies to the original one, which can duplicate jobs, fail pipelines or skip compliance checks. Migrate a project's compliance pipeline before you enable a policy there.

Which GitLab tier do I need?

Both compliance pipelines and pipeline execution policies are Ultimate features, on GitLab.com, GitLab Self-Managed and GitLab Dedicated.

Sources

Checked against these pages on 20 November 2026. GitLab changes quickly — if something here no longer matches, tell us and we will fix it.

Do this from your phone with MergeBell

Free for the whole review loop: the To-Do inbox, diffs and line comments, approve and merge, pipelines with retry, and push alerts for your To-Dos. Works with gitlab.com and self-managed GitLab 16.0+.

Get MergeBell for iPhoneGet MergeBell for Android

On the App Store for iOS 26 or later and on Google Play for Android 12 or later. An independent app, not affiliated with GitLab Inc.