Scheduled pipeline does not start

Scheduled pipeline does not start

Describe your question in as much detail as possible:

I have a trivial pipeline but somehow a scheduled invocation does not start. The first job in the pipeline states:

This job has not been triggered yet
This job depends on upstream jobs that need to succeed in order for this job to be triggered

You can see the whole pipeline (both variants) here:

stages:
  - prepare
  - build
  - dast

build:
  stage: build
  script:
    - echo 'building'    
  rules:
    - if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH"

dependencyCheckDownload:
  stage: prepare
  image: "azul/zulu-openjdk-alpine:11"
  allow_failure: true
  needs: []
  rules:
    - if: $CI_PIPELINE_SOURCE == "schedule"
  script:
    - echo "pipeline source ... $CI_PIPELINE_SOURCE ...."
    - echo 'downloading dep lists'

dependencyCheck:
  stage: dast
  rules:
    - if: $CI_PIPELINE_SOURCE == "schedule"
  script:
    - echo 'performing dep check'
  artifacts:
    paths:
      - "*/build/reports/*.html"
    expire_in: 1 week
    when: on_failure
  dependencies:
    - dependencyCheckDownload

The generated pipeline which does not start running can be seen here:

Note that the normal MR pipelines and manual pipeline invocations do work as expected.

ok, I reduced the pipeline even further to

stages:
  - dast

dependencyCheck:
  stage: dast
  script:
    - echo 'performing dep check'

and that one does not work either.

however: if I rename the stage to foo, everything works as expected!!!

stages:
  - foo

dependencyCheck:
  stage: foo
  script:
    - echo 'performing dep check'

It is a complete mystery why naming the stage dast in an otherwise empty pipeline should cause this behaviour!

I created Scheduled pipeline does not start (#398225) · Issues · GitLab.org / GitLab · GitLab and there is some more useful info linked. The upshot is, dast is a hardcoded gitlab-ci term that has a bunch of consequences for your pipeline. See also CI configuration with "dast" stage causes scheduled pipelines to not run (Insufficient permissions for dast_configuration keyword) (#352098) · Issues · GitLab.org / GitLab · GitLab.

This has been a quite frustrating experience having such hard to find hardcoded features when you think “my pipeline is nearly empty”.

1 Like