Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f600a548
Commit
f600a548
authored
Apr 19, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
235c7efc
1879486d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
6 deletions
+9
-6
.gitlab/ci/review.gitlab-ci.yml
.gitlab/ci/review.gitlab-ci.yml
+2
-1
lib/quality/kubernetes_client.rb
lib/quality/kubernetes_client.rb
+2
-0
scripts/review_apps/review-apps.sh
scripts/review_apps/review-apps.sh
+3
-3
spec/lib/quality/kubernetes_client_spec.rb
spec/lib/quality/kubernetes_client_spec.rb
+2
-2
No files found.
.gitlab/ci/review.gitlab-ci.yml
View file @
f600a548
...
...
@@ -32,7 +32,6 @@
environment
:
&review-environment
name
:
review/${CI_COMMIT_REF_NAME}
url
:
https://gitlab-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}
before_script
:
[]
.review-docker
:
&review-docker
<<
:
*review-base
...
...
@@ -48,6 +47,7 @@
DOCKER_HOST
:
tcp://docker:2375
LATEST_QA_IMAGE
:
"
gitlab/${CI_PROJECT_NAME}-qa:nightly"
QA_IMAGE
:
"
${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab/${CI_PROJECT_NAME}-qa:${CI_COMMIT_REF_SLUG}"
before_script
:
[]
build-qa-image
:
<<
:
*review-docker
...
...
@@ -85,6 +85,7 @@ schedule:review-build-cng:
.review-deploy-base
:
&review-deploy-base
<<
:
*review-base
retry
:
2
allow_failure
:
true
variables
:
HOST_SUFFIX
:
"
${CI_ENVIRONMENT_SLUG}"
...
...
lib/quality/kubernetes_client.rb
View file @
f600a548
...
...
@@ -18,6 +18,8 @@ module Quality
'delete'
,
'ingress,svc,pdb,hpa,deploy,statefulset,job,pod,secret,configmap,pvc,secret,clusterrole,clusterrolebinding,role,rolebinding,sa'
,
'--now'
,
'--ignore-not-found'
,
'--include-uninitialized'
,
%(-l release="#{release_name}")
]
...
...
scripts/review_apps/review-apps.sh
View file @
f600a548
...
...
@@ -68,7 +68,7 @@ function delete() {
echoinfo
"Deleting release '
$name
'..."
true
helm delete
--purge
"
$name
"
||
true
helm delete
--purge
"
$name
"
}
function
cleanup
()
{
...
...
@@ -81,8 +81,8 @@ function cleanup() {
kubectl
-n
"
$KUBE_NAMESPACE
"
delete
\
ingress,svc,pdb,hpa,deploy,statefulset,job,pod,secret,configmap,pvc,secret,clusterrole,clusterrolebinding,role,rolebinding,sa
\
-
l
release
=
"
$CI_ENVIRONMENT_SLUG
"
\
||
true
-
-now
--ignore-not-found
--include-uninitialized
\
-l
release
=
"
$CI_ENVIRONMENT_SLUG
"
}
function
get_pod
()
{
...
...
spec/lib/quality/kubernetes_client_spec.rb
View file @
f600a548
...
...
@@ -13,7 +13,7 @@ RSpec.describe Quality::KubernetesClient do
expect
(
Gitlab
::
Popen
).
to
receive
(
:popen_with_detail
)
.
with
([
%(kubectl --namespace "#{namespace}" delete )
\
'ingress,svc,pdb,hpa,deploy,statefulset,job,pod,secret,configmap,pvc,secret,clusterrole,clusterrolebinding,role,rolebinding,sa '
\
"--now -l release=
\"
#{
release_name
}
\"
"
])
"--now -
-ignore-not-found --include-uninitialized -
l release=
\"
#{
release_name
}
\"
"
])
.
and_return
(
Gitlab
::
Popen
::
Result
.
new
([],
''
,
''
,
double
(
success?:
false
)))
expect
{
subject
.
cleanup
(
release_name:
release_name
)
}.
to
raise_error
(
described_class
::
CommandFailedError
)
...
...
@@ -23,7 +23,7 @@ RSpec.describe Quality::KubernetesClient do
expect
(
Gitlab
::
Popen
).
to
receive
(
:popen_with_detail
)
.
with
([
%(kubectl --namespace "#{namespace}" delete )
\
'ingress,svc,pdb,hpa,deploy,statefulset,job,pod,secret,configmap,pvc,secret,clusterrole,clusterrolebinding,role,rolebinding,sa '
\
"--now -l release=
\"
#{
release_name
}
\"
"
])
"--now -
-ignore-not-found --include-uninitialized -
l release=
\"
#{
release_name
}
\"
"
])
.
and_return
(
Gitlab
::
Popen
::
Result
.
new
([],
''
,
''
,
double
(
success?:
true
)))
# We're not verifying the output here, just silencing it
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment