You want to include a slow security scan only on a nightly schedule.
BeginnerScenarioGitLab CI
Answer
Situation read → Schedule-specific jobs.
What I'd do →
- Create a pipeline schedule (CI/CD > Schedules) with cron
0 2 * * *. - In the job:
rules: - if: $CI_PIPELINE_SOURCE == "schedule". - Set a schedule variable like
FULL_SCAN=trueif needed.
Why → Heavy scans stay off the fast feedback path.
Interview tip → Keep a quick scan on MRs and the full scan nightly.
More on GitLab CI
How does GitLab CI/CD work at a high level?BeginnerWhat is a GitLab Runner and what executors exist?IntermediateWhat are the types of runners (shared, group, project) and tags?IntermediateHow do `rules:` work and how do they replace `only/except`?IntermediateWhat are workflow rules and how do they prevent duplicate pipelines?AdvancedHow do artifacts and cache differ in GitLab CI?Intermediate