Subee Na
Subee Na

Reputation: 55

Gitlab CI include is not triggering

Expecting:CI need to trigger build and test then it should scan for dependencies vulnerability

Current Behaviour CI trigger but only run build and test not running Dependency-Scanning.gitlab-ci.yml

stages:
    - build
    - test

build:
    stage: build
    script:
        - echo "Building"

test:
    stage: test
    script:
        - echo "Testing"

include:
  - template: Dependency-Scanning.gitlab-ci.yml

Dependency-Scanning.gitlab-ci.yml can be found in the following URL https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Security/Dependency-Scanning.gitlab-ci.yml

Upvotes: 0

Views: 1365

Answers (1)

amishpanda
amishpanda

Reputation: 91

You can try moving it to the top of the file. Works for me.

Can you toss the error in your post? Are you getting something like this if you use the CI linter? https://gitlab.com/amishpanda/cheatsheet/-/ci/lint


Found errors in your .gitlab-ci.yml:

    dependency_scanning job: stage parameter should be .pre
    setup
    build
    .post

You can also test your .gitlab-ci.yml in CI Lint 

Upvotes: 0

Related Questions