summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-09-27 15:41:33 +0300
committerDylan Griffith <dyl.griffith@gmail.com>2018-09-27 15:46:11 +0300
commit2c2556f9d9c4ef5ca0a94194f5aa2d52fa3cb8f1 (patch)
tree375b3f33e24ed9d81f6233bef94d10cee464c51e
parent7c1cfd0bf5fd394e0e4387e350d69767aa873f84 (diff)
downloadgitlab-ce-48399-skip-auto-devops-jobs-based-on-license.tar.gz
Skip creating auto devops jobs for sast, container_scanning, dast, dependency_scanning when not licensed48399-skip-auto-devops-jobs-based-on-license
-rw-r--r--changelogs/unreleased/48399-skip-auto-devops-jobs-based-on-license.yml6
-rw-r--r--lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml17
2 files changed, 20 insertions, 3 deletions
diff --git a/changelogs/unreleased/48399-skip-auto-devops-jobs-based-on-license.yml b/changelogs/unreleased/48399-skip-auto-devops-jobs-based-on-license.yml
new file mode 100644
index 00000000000..042731fb9be
--- /dev/null
+++ b/changelogs/unreleased/48399-skip-auto-devops-jobs-based-on-license.yml
@@ -0,0 +1,6 @@
+---
+title: Skip creating auto devops jobs for sast, container_scanning, dast, dependency_scanning
+ when not licensed
+merge_request: 21959
+author:
+type: performance
diff --git a/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml b/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
index e3a2534e97a..890dee838d6 100644
--- a/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
@@ -159,7 +159,10 @@ sast:
artifacts:
paths: [gl-sast-report.json]
only:
- - branches
+ refs:
+ - branches
+ variables:
+ - $GITLAB_FEATURES =~ /\bsast\b/
except:
variables:
- $SAST_DISABLED
@@ -176,7 +179,10 @@ dependency_scanning:
artifacts:
paths: [gl-dependency-scanning-report.json]
only:
- - branches
+ refs:
+ - branches
+ variables:
+ - $GITLAB_FEATURES =~ /\bdependency_scanning\b/
except:
variables:
- $DEPENDENCY_SCANNING_DISABLED
@@ -193,7 +199,10 @@ container_scanning:
artifacts:
paths: [gl-container-scanning-report.json]
only:
- - branches
+ refs:
+ - branches
+ variables:
+ - $GITLAB_FEATURES =~ /\bsast_container\b/
except:
variables:
- $CONTAINER_SCANNING_DISABLED
@@ -212,6 +221,8 @@ dast:
refs:
- branches
kubernetes: active
+ variables:
+ - $GITLAB_FEATURES =~ /\bdast\b/
except:
refs:
- master