2021-09-30 23:02:18 +05:30
|
|
|
# To contribute improvements to CI/CD templates, please follow the Development guide at:
|
|
|
|
# https://docs.gitlab.com/ee/development/cicd/templates.html
|
|
|
|
# This specific template is located at:
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Security/License-Scanning.gitlab-ci.yml
|
|
|
|
|
2021-03-11 19:13:27 +05:30
|
|
|
# Read more about this feature here: https://docs.gitlab.com/ee/user/compliance/license_compliance/index.html
|
2020-03-13 15:44:24 +05:30
|
|
|
#
|
2021-09-30 23:02:18 +05:30
|
|
|
# Configure license scanning with CI/CD variables (https://docs.gitlab.com/ee/ci/variables/index.html).
|
2021-09-04 01:27:46 +05:30
|
|
|
# List of available variables: https://docs.gitlab.com/ee/user/compliance/license_compliance/#available-variables
|
2020-03-13 15:44:24 +05:30
|
|
|
|
|
|
|
variables:
|
2020-05-24 23:13:21 +05:30
|
|
|
# Setting this variable will affect all Security templates
|
|
|
|
# (SAST, Dependency Scanning, ...)
|
|
|
|
SECURE_ANALYZERS_PREFIX: "registry.gitlab.com/gitlab-org/security-products/analyzers"
|
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
LICENSE_MANAGEMENT_SETUP_CMD: '' # If needed, specify a command to setup your environment with a custom package manager.
|
2020-05-24 23:13:21 +05:30
|
|
|
LICENSE_MANAGEMENT_VERSION: 3
|
2020-03-13 15:44:24 +05:30
|
|
|
|
|
|
|
license_scanning:
|
|
|
|
stage: test
|
|
|
|
image:
|
2020-05-24 23:13:21 +05:30
|
|
|
name: "$SECURE_ANALYZERS_PREFIX/license-finder:$LICENSE_MANAGEMENT_VERSION"
|
2020-03-13 15:44:24 +05:30
|
|
|
entrypoint: [""]
|
|
|
|
variables:
|
2020-06-23 00:09:42 +05:30
|
|
|
LM_REPORT_VERSION: '2.1'
|
2020-03-13 15:44:24 +05:30
|
|
|
SETUP_CMD: $LICENSE_MANAGEMENT_SETUP_CMD
|
|
|
|
allow_failure: true
|
|
|
|
script:
|
|
|
|
- /run.sh analyze .
|
|
|
|
artifacts:
|
|
|
|
reports:
|
2020-07-28 23:09:34 +05:30
|
|
|
license_scanning: gl-license-scanning-report.json
|
2020-03-13 15:44:24 +05:30
|
|
|
dependencies: []
|
2020-05-24 23:13:21 +05:30
|
|
|
rules:
|
|
|
|
- if: $LICENSE_MANAGEMENT_DISABLED
|
|
|
|
when: never
|
|
|
|
- if: $CI_COMMIT_BRANCH &&
|
|
|
|
$GITLAB_FEATURES =~ /\blicense_scanning\b/
|