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
05943523
Commit
05943523
authored
Apr 29, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
0c4a25f3
addefa8e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
12 deletions
+25
-12
app/controllers/projects/environments_controller.rb
app/controllers/projects/environments_controller.rb
+4
-4
app/models/deployment.rb
app/models/deployment.rb
+5
-1
changelogs/unreleased/60821-deployment-jobs-broken-as-of-11-10-0.yml
...unreleased/60821-deployment-jobs-broken-as-of-11-10-0.yml
+5
-0
qa/qa/vendor/github/page/login.rb
qa/qa/vendor/github/page/login.rb
+1
-3
spec/controllers/projects/environments_controller_spec.rb
spec/controllers/projects/environments_controller_spec.rb
+4
-4
spec/models/deployment_spec.rb
spec/models/deployment_spec.rb
+6
-0
No files found.
app/controllers/projects/environments_controller.rb
View file @
05943523
...
...
@@ -135,13 +135,13 @@ class Projects::EnvironmentsController < Projects::ApplicationController
end
def
metrics
respond_to
do
|
format
|
format
.
html
format
.
json
do
# Currently, this acts as a hint to load the metrics details into the cache
# if they aren't there already
@metrics
=
environment
.
metrics
||
{}
respond_to
do
|
format
|
format
.
html
format
.
json
do
render
json:
@metrics
,
status:
@metrics
.
any?
?
:ok
:
:no_content
end
end
...
...
app/models/deployment.rb
View file @
05943523
...
...
@@ -85,7 +85,11 @@ class Deployment < ApplicationRecord
end
def
cluster
project
.
deployment_platform
(
environment:
environment
.
name
)
&
.
cluster
platform
=
project
.
deployment_platform
(
environment:
environment
.
name
)
if
platform
.
present?
&&
platform
.
respond_to?
(
:cluster
)
platform
.
cluster
end
end
def
execute_hooks
...
...
changelogs/unreleased/60821-deployment-jobs-broken-as-of-11-10-0.yml
0 → 100644
View file @
05943523
---
title
:
Fix Kubernetes service template deployment jobs broken as of 11.10.0
merge_request
:
27687
author
:
type
:
fixed
qa/qa/vendor/github/page/login.rb
View file @
05943523
...
...
@@ -12,12 +12,10 @@ module QA
fill_in
'password'
,
with:
QA
::
Runtime
::
Env
.
github_password
click_on
'Sign in'
unless
has_no_text?
(
"Authorize GitLab-OAuth"
)
click_on
'Authorize gitlab-qa'
if
has_button?
(
'Authorize gitlab-qa'
)
end
end
end
end
end
end
end
spec/controllers/projects/environments_controller_spec.rb
View file @
05943523
...
...
@@ -342,11 +342,9 @@ describe Projects::EnvironmentsController do
end
context
'when environment has no metrics'
do
before
do
expect
(
environment
).
to
receive
(
:metrics
).
and_return
(
nil
)
end
it
'returns a metrics page'
do
expect
(
environment
).
not_to
receive
(
:metrics
)
get
:metrics
,
params:
environment_params
expect
(
response
).
to
be_ok
...
...
@@ -354,6 +352,8 @@ describe Projects::EnvironmentsController do
context
'when requesting metrics as JSON'
do
it
'returns a metrics JSON document'
do
expect
(
environment
).
to
receive
(
:metrics
).
and_return
(
nil
)
get
:metrics
,
params:
environment_params
(
format: :json
)
expect
(
response
).
to
have_gitlab_http_status
(
204
)
...
...
spec/models/deployment_spec.rb
View file @
05943523
...
...
@@ -400,6 +400,12 @@ describe Deployment do
it
{
is_expected
.
to
be_nil
}
end
context
'project uses the kubernetes service for deployments'
do
let!
(
:service
)
{
create
(
:kubernetes_service
,
project:
project
)
}
it
{
is_expected
.
to
be_nil
}
end
context
'project has a deployment platform'
do
let!
(
:cluster
)
{
create
(
:cluster
,
projects:
[
project
])
}
let!
(
:platform
)
{
create
(
:cluster_platform_kubernetes
,
cluster:
cluster
)
}
...
...
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