What usually triggers a CI pipeline?
A CI pipeline is usually triggered by events in Git, that is, by changes in the repository that could potentially affect the code.
Put simply: CI runs every time new code appears or existing code changes.
The main triggers of a CI pipeline
1. Push (commits)
The most common trigger:
git pushto any branch- or only to specific branches (
main,develop)
Every new commit is checked.
2. Pull Request / Merge Request
A very common scenario:
- opening a PR
- updating a PR with new commits
- changing the target branch
Lets you check the code before merging.
3. Tags
Often used for releases:
- creating a tag (
v1.2.0) - pushing the tag to the repository
Can trigger:
- building a release
- deployment
- publishing artifacts
4. Merging into the main branch
In some teams, CI is configured so that:
- a merge into
main - automatically triggers the pipeline
The already-integrated code is checked.
5. Manual run
CI can be run manually:
- with a button in the interface
- via the API
Used for:
- re-running the pipeline
- debugging
- non-standard tasks
6. On a schedule (less often)
Sometimes CI runs:
- on a cron schedule
- at night or once a day
For example:
- nightly tests
- dependency checks
What is important to highlight in an interview
- CI is almost always tied to Git events
- the most important triggers are push and PR
- tags are often used for release pipelines
Short answer for an interview
A CI pipeline is usually triggered by events in Git: pushing commits, opening or updating a Pull Request, merging into the main branch, and creating tags.
Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.