Commit 7e2b359f authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch...

Merge branch '207072-ignored-kubernetes-error-in-review-cleanup-should-not-cause-the-job-to-abort' into 'master'

Resolve "Ignored kubernetes error in review-cleanup should not cause the job to abort"

Closes #207072

See merge request gitlab-org/gitlab!25397
parents 3275a6ca d1a193a6
......@@ -48,7 +48,8 @@ module Quality
resource_names = raw_resource_names
command = [
'delete',
%(--namespace "#{namespace}")
%(--namespace "#{namespace}"),
'--ignore-not-found'
]
Array(release_name).each do |release|
......
......@@ -38,7 +38,7 @@ RSpec.describe Quality::KubernetesClient do
.and_return(Gitlab::Popen::Result.new([], '', '', double(success?: true)))
expect(Gitlab::Popen).to receive(:popen_with_detail)
.with([%(kubectl delete --namespace "#{namespace}" #{pod_for_release})])
.with([%(kubectl delete --namespace "#{namespace}" --ignore-not-found #{pod_for_release})])
.and_return(Gitlab::Popen::Result.new([], '', '', double(success?: true)))
# We're not verifying the output here, just silencing it
......@@ -64,7 +64,7 @@ RSpec.describe Quality::KubernetesClient do
.and_return(Gitlab::Popen::Result.new([], '', '', double(success?: true)))
expect(Gitlab::Popen).to receive(:popen_with_detail)
.with([%(kubectl delete --namespace "#{namespace}" #{pod_for_release})])
.with([%(kubectl delete --namespace "#{namespace}" --ignore-not-found #{pod_for_release})])
.and_return(Gitlab::Popen::Result.new([], '', '', double(success?: true)))
# We're not verifying the output here, just silencing it
......@@ -89,7 +89,7 @@ RSpec.describe Quality::KubernetesClient do
.and_return(Gitlab::Popen::Result.new([], '', '', double(success?: true)))
expect(Gitlab::Popen).to receive(:popen_with_detail)
.with([%(kubectl delete --namespace "#{namespace}" #{pod_for_release})])
.with([%(kubectl delete --namespace "#{namespace}" --ignore-not-found #{pod_for_release})])
.and_return(Gitlab::Popen::Result.new([], '', '', double(success?: true)))
# We're not verifying the output here, just silencing it
......
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