Problem Statement
Which trigger is valid in GitLab CI/CD?
Explanation
GitLab CI/CD supports multiple pipeline triggers. Push events trigger pipelines on commits to branches. Merge request pipelines run when MR is created or updated, testing changes before merging. Scheduled pipelines run at specified times (cron syntax) for nightly builds or periodic tasks. Manual pipelines are triggered through UI, API, or when job has when: manual directive. External webhooks trigger pipelines from external systems.
Pipeline rules control when pipelines run using rules keyword:
```yaml
job:
script: echo "Hello"
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH == "main"'
```
Only keyword (legacy) specifies refs or branches:
```yaml
job:
script: echo "Deploy"
only:
- main
- tags
```
Trigger tokens enable triggering pipelines via API with authentication. Multi-project pipelines trigger other projects' pipelines. Parent-child pipelines include child pipeline configurations. Understanding triggers enables flexible pipeline orchestration responding to various events.
