BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
829a708a
Commit
829a708a
authored
Oct 18, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix remaining specs failures
parent
e35af6e2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
7 deletions
+14
-7
merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+6
-1
index.html.haml
app/views/projects/environments/index.html.haml
+1
-1
show.html.haml
app/views/projects/environments/show.html.haml
+1
-1
widget_deployments_spec.rb
spec/features/merge_requests/widget_deployments_spec.rb
+6
-4
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
829a708a
...
...
@@ -412,11 +412,16 @@ class Projects::MergeRequestsController < Projects::ApplicationController
project
=
environment
.
project
deployment
=
environment
.
first_deployment_for
(
@merge_request
.
diff_head_commit
)
stop_url
=
if
environment
.
stoppable?
&&
can?
(
current_user
,
:create_deployment
,
environment
)
stop_namespace_project_environment_path
(
project
.
namespace
,
project
,
environment
)
end
{
id:
environment
.
id
,
name:
environment
.
name
,
url:
namespace_project_environment_path
(
project
.
namespace
,
project
,
environment
),
stop_url:
(
stop_namespace_project_environment_path
(
project
.
namespace
,
project
,
environment
)
if
environment
.
stoppable?
)
,
stop_url:
stop_url
,
external_url:
environment
.
external_url
,
external_url_formatted:
environment
.
formatted_external_url
,
deployed_at:
deployment
.
try
(
:created_at
),
...
...
app/views/projects/environments/index.html.haml
View file @
829a708a
...
...
@@ -23,7 +23,7 @@
New environment
.environments-container
-
if
@environments
.
blank?
-
if
@
all_
environments
.
blank?
.blank-state.blank-state-no-icon
%h2
.blank-state-title
You don't have any environments right now.
...
...
app/views/projects/environments/show.html.haml
View file @
829a708a
...
...
@@ -3,7 +3,7 @@
=
render
"projects/pipelines/head"
%div
{
class:
container_class
}
.top-area
.top-area
.adjust
.col-md-9
%h3
.page-title
=
@environment
.
name
.
capitalize
.col-md-3
...
...
spec/features/merge_requests/widget_deployments_spec.rb
View file @
829a708a
...
...
@@ -9,9 +9,8 @@ feature 'Widget Deployments Header', feature: true, js: true do
given
(
:merge_request
)
{
create
(
:merge_request
,
:merged
)
}
given
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
given
(
:role
)
{
:developer
}
given!
(
:deployment
)
do
create
(
:deployment
,
environment:
environment
,
sha:
project
.
commit
(
'master'
).
id
)
end
given
(
:sha
)
{
project
.
commit
(
'master'
).
id
}
given!
(
:deployment
)
{
create
(
:deployment
,
environment:
environment
,
sha:
sha
)
}
given!
(
:manual
)
{
}
background
do
...
...
@@ -31,7 +30,10 @@ feature 'Widget Deployments Header', feature: true, js: true do
given
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
given
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
given
(
:manual
)
{
create
(
:ci_build
,
:manual
,
pipeline:
pipeline
,
name:
'close_app'
)
}
given
(
:deployment
)
{
create
(
:deployment
,
environment:
environment
,
deployable:
build
,
on_stop:
'close_app'
)
}
given
(
:deployment
)
do
create
(
:deployment
,
environment:
environment
,
ref:
merge_request
.
target_branch
,
sha:
sha
,
deployable:
build
,
on_stop:
'close_app'
)
end
background
do
wait_for_ajax
...
...
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