summaryrefslogtreecommitdiff
path: root/lib/quality
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-24 15:06:02 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-24 15:06:02 +0000
commit8db8e2a34205c67e358cf544745d9eaeb30cd032 (patch)
treeabfd747d94a4a77e0dfac5ac29cd7b57343edff9 /lib/quality
parent33813f993b49da58426d33a148ee70952e6835bb (diff)
downloadgitlab-ce-8db8e2a34205c67e358cf544745d9eaeb30cd032.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/quality')
-rw-r--r--lib/quality/kubernetes_client.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/quality/kubernetes_client.rb b/lib/quality/kubernetes_client.rb
index 190b48ba7cb..0bd16935045 100644
--- a/lib/quality/kubernetes_client.rb
+++ b/lib/quality/kubernetes_client.rb
@@ -13,6 +13,15 @@ module Quality
end
def cleanup(release_name:)
+ selector = case release_name
+ when String
+ %(-l release="#{release_name}")
+ when Array
+ %(-l 'release in (#{release_name.join(', ')})')
+ else
+ raise ArgumentError, 'release_name must be a string or an array'
+ end
+
command = [
%(--namespace "#{namespace}"),
'delete',
@@ -20,7 +29,7 @@ module Quality
'--now',
'--ignore-not-found',
'--include-uninitialized',
- %(-l release="#{release_name}")
+ selector
]
run_command(command)