CI Pipeline Restrictions / "Once" Manual Semantics

Description

I've started to automate a lot of my infrastructure with Terraform and I'd like to control this automation through GitLab CI. The problem is that manual jobs can be re-executed and can't be disable after run, or disabled upon new pipeline on the same branch.

Proposal

Ability to allow only a single pipeline for a branch to run at any given time.

# Top Level .gitlab-ci.yml
unique: branch

This should cancel any pending CI jobs still to run for this branch

# Job Level .gitlab-ci.yml
job:
  script: terraform plan
  when: manual
  limit: once

This would allow "destructive" steps to become disabled after having run once

Edited Jun 27, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading