Course contentsShow
← Cloud and Infrastructure
Lesson 1735 of 2,98936. GitLab CI/CDFree lesson

Pipeline Triggers: When Pipelines Run

Control pipeline execution with push events, merge requests, tags, and scheduled pipelines.

Pipeline Triggers: When Pipelines Run

What you'll learn: How to control exactly when your GitLab CI/CD pipelines execute using different event types.

Why Pipeline Triggers Matter

Not every code change needs to run the same pipeline—or any pipeline at all. GitLab CI/CD lets you specify when pipelines should run based on different events in your repository. Think of triggers as alarm clocks: you set different alarms for different occasions (weekdays vs weekends, morning vs evening).

Core Trigger Types

Push Events

The most common trigger: pipelines run automatically when code is pushed to a branch. This is GitLab's default behavior—every push kicks off your .gitlab-ci.yml pipeline.

Merge Request Pipelines

Pipelines that run specifically when a merge request is created or updated. These validate changes before they're merged into your main branch, catching issues early in the review process.

Tag Pipelines

Triggered when you push a Git tag to your repository. Commonly used for release workflows—when you tag version v1.2.3, the pipeline builds and deploys that specific release.

Scheduled Pipelines

Run pipelines on a schedule (like cron jobs). Perfect for nightly builds, weekly security scans, or regular maintenance tasks that aren't tied to code changes.

Why This Matters

Different triggers serve different purposes: push events for continuous integration, merge request pipelines for code review validation, tags for releases, and schedules for periodic tasks. By controlling when pipelines run, you optimize resource usage and ensure the right work happens at the right time.

Key Takeaway: GitLab pipeline triggers—push events, merge requests, tags, and schedules—give you precise control over when your CI/CD workflows execute, matching pipeline execution to your team's development and release patterns.