Dependency Scanner "Pipeline cannot be run. No stages / jobs for this pipeline."

Summary

when tryng to test implementation of Dependency-scanning `Dependency-Scanning.gitlab-ci.yml' at first I met an error : "Pipeline cannot be run. No stages / jobs for this pipeline." Below the code of the gitlab.yml "stages:

  • test
  • deploy

include:

  • template: Dependency-Scanning.gitlab-ci.yml"

Steps to reproduce

  1. in your Gitlab ci environnement create a new project

  2. set up a new CI/CD Pipeline -> will open an empty gitlab-ci.yml just add the lines of the description

  3. in the directory just add any "Gemfile.lock" file and any pom.xml so that scanners can detect these file formats

  4. then go to CI/CD pipelines and Run the pipeline

Example Project

What is the current bug behavior?

you will have an error "Pipeline cannot be run. No stages / jobs for this pipeline."

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by Doha Guy TAPE