Commit 106bc23d authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch '4907-improve-build-create-performance-for-license-management' into 'master'

Dont create license_management build when not included in license

See merge request gitlab-org/gitlab-ce!21958
parents f7e28d26 df796a42
---
title: Dont create license_management build when not included in license
merge_request: 21958
author:
type: performance
...@@ -122,6 +122,9 @@ license_management: ...@@ -122,6 +122,9 @@ license_management:
paths: [gl-license-management-report.json] paths: [gl-license-management-report.json]
only: only:
- branches - branches
only:
variables:
- $GITLAB_FEATURES =~ /\blicense_management\b/
except: except:
variables: variables:
- $LICENSE_MANAGEMENT_DISABLED - $LICENSE_MANAGEMENT_DISABLED
...@@ -484,15 +487,11 @@ rollout 100%: ...@@ -484,15 +487,11 @@ rollout 100%:
} }
function license_management() { 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"
# 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/')
LICENSE_MANAGEMENT_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
docker run --volume "$PWD:/code" \ docker run --volume "$PWD:/code" \
"registry.gitlab.com/gitlab-org/security-products/license-management:$LICENSE_MANAGEMENT_VERSION" analyze /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() { function sast() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment