diff options
author | Olivier Gonzalez <ogonzalez@gitlab.com> | 2018-06-06 22:01:47 +0300 |
---|---|---|
committer | Olivier Gonzalez <ogonzalez@gitlab.com> | 2018-06-06 22:01:47 +0300 |
commit | dd4e6bb9262c9ab0f1f91913e1ac103a1dc82b7e (patch) | |
tree | 4b34f2ed44c0928859f02801078afe55cc808429 /vendor/gitlab-ci-yml | |
parent | 4f526a334be7bd2875a7037172a344140a515fe6 (diff) |
Update vendored ADO template with adding of license management
Diffstat (limited to 'vendor/gitlab-ci-yml')
-rw-r--r-- | vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml b/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml index 27e8245185e..0d58a00482a 100644 --- a/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml +++ b/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml @@ -10,6 +10,7 @@ # Test jobs may be disabled by setting environment variables: # * test: TEST_DISABLED # * code_quality: CODE_QUALITY_DISABLED +# * license_management: LICENSE_MANAGEMENT_DISABLED # * performance: PERFORMANCE_DISABLED # * sast: SAST_DISABLED # * dependency_scanning: DEPENDENCY_SCANNING_DISABLED @@ -108,6 +109,22 @@ code_quality: variables: - $CODE_QUALITY_DISABLED +license_management: + image: docker:stable + variables: + DOCKER_DRIVER: overlay2 + allow_failure: true + services: + - docker:stable-dind + script: + - setup_docker + - license_management + artifacts: + paths: [gl-license-management-report.json] + except: + variables: + - $LICENSE_MANAGEMENT_DISABLED + performance: stage: performance image: docker:stable @@ -462,6 +479,18 @@ rollout 100%: "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code } + function license_management() { + if echo $GITLAB_FEATURES |grep license_management > /dev/null ; then + # Extract "MAJOR.MINOR" from CI_SERVER_VERSION and generate "MAJOR-MINOR-stable" + LICENSE_MANAGEMENT_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') + + docker run --volume "$PWD:/code" \ + "registry.gitlab.com/gitlab-org/security-products/license-management:$LICENSE_MANAGEMENT_VERSION" analyze /code + else + echo "License management is not available in your subscription" + fi + } + function sast() { case "$CI_SERVER_VERSION" in *-ee) |