I am encountering some weirdness with Gitlab CI includes, anyone ever see something like this?
I am trying to use gitlab's secret detection through a simple
include:
- template: Secret-Detection.gitlab-ci.yml
which references this here....but it doesn't work at all, no step ever shows, unless I re -specify this part from Secret-Detection.gitlab-ci.yml but in my own repo's .gitlab-ci.yml:
secret_detection:
rules:
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
But why would that help if its already in the original Secret-Detection.gitlab-ci.yml ??
Basically, this doesn't work:
include:
- template: Secret-Detection.gitlab-ci.yml
But this does work:
include:
- template: Secret-Detection.gitlab-ci.yml
secret_detection:
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
I am using Gitlab 13.2.3 EE. I am working on a branch/not master.