summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/templates/Security/License-Scanning.gitlab-ci.yml
blob: 5c790f3e0abcdebe16074eaea2c7e60a65a8fcbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Read more about this feature here: https://docs.gitlab.com/ee/user/application_security/license_compliance/
#
# Configure the scanning tool through the environment variables.
# List of the variables: https://gitlab.com/gitlab-org/security-products/license-management#settings
# How to set: https://docs.gitlab.com/ee/ci/yaml/#variables

variables:
  LICENSE_MANAGEMENT_SETUP_CMD: ''  # If needed, specify a command to setup your environment with a custom package manager.

license_scanning:
  stage: test
  image:
    name: "registry.gitlab.com/gitlab-org/security-products/license-management:$CI_SERVER_VERSION_MAJOR-$CI_SERVER_VERSION_MINOR-stable"
    entrypoint: [""]
  variables:
    SETUP_CMD: $LICENSE_MANAGEMENT_SETUP_CMD
  allow_failure: true
  script:
    - /run.sh analyze .
  after_script:
    - mv gl-license-management-report.json gl-license-scanning-report.json
  artifacts:
    reports:
      license_scanning: gl-license-scanning-report.json
  dependencies: []
  only:
    refs:
      - branches
    variables:
      - $GITLAB_FEATURES =~ /\blicense_management\b/
  except:
    variables:
      - $LICENSE_MANAGEMENT_DISABLED