Interview Prep/CI/CD/GitLab CI Failures

`rules:changes` job always runs on new branches.

AdvancedTroubleshootingGitLab CI Failures
Answer

Likely causes → For branch pipelines without a base, changes evaluates true when there is no previous commit.

Diagnose → Check whether it is a first push to the branch.

Fix → Add compare_to: refs/heads/main under rules:changes, or use MR pipelines.

Prevent → Prefer MR pipelines for change-based rules.

All CI/CD questions Roadmap: GitLab CI/CD

More on GitLab CI Failures