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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
2dc907bc
Commit
2dc907bc
authored
Dec 07, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes after review
Fix error
parent
19e1b324
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
13 deletions
+11
-13
app/helpers/environment_helper.rb
app/helpers/environment_helper.rb
+6
-8
app/views/projects/builds/show.html.haml
app/views/projects/builds/show.html.haml
+1
-1
spec/features/projects/builds_spec.rb
spec/features/projects/builds_spec.rb
+4
-4
No files found.
app/helpers/environment_helper.rb
View file @
2dc907bc
...
...
@@ -14,16 +14,14 @@ module EnvironmentHelper
end
end
def
deployment_link
(
deployment
)
def
deployment_link
(
deployment
,
text
)
return
unless
deployment
if
text
link_to
text
,
[
deployment
.
project
.
namespace
.
becomes
(
Namespace
),
deployment
.
project
,
deployment
.
deployable
]
else
link_to
"#
#{
deployment
.
iid
}
"
,
[
deployment
.
project
.
namespace
.
becomes
(
Namespace
),
deployment
.
project
,
deployment
.
deployable
]
end
def
last_deployment_link
(
deployment
,
link_text
)
return
unless
deployment
link_to
link_text
,
[
deployment
.
project
.
namespace
.
becomes
(
Namespace
),
deployment
.
project
,
deployment
.
deployable
]
end
def
last_deployment_link_for_environment_build
(
project
,
build
)
...
...
app/views/projects/builds/show.html.haml
View file @
2dc907bc
...
...
@@ -46,7 +46,7 @@
-
else
This build is creating a deployment to
#{
environment_link_for_build
(
@build
.
project
,
@build
)
}
-
if
environment
.
try
(
:last_deployment
)
and will overwrite the
#{
last_
deployment_link
(
environment
.
last_deployment
,
'latest deployment'
)
}
and will overwrite the
#{
deployment_link
(
environment
.
last_deployment
,
'latest deployment'
)
}
.prepend-top-default
-
if
@build
.
erased?
...
...
spec/features/projects/builds_spec.rb
View file @
2dc907bc
...
...
@@ -228,8 +228,8 @@ feature 'Builds', :feature do
end
end
context
'
W
hen build starts environment'
do
context
'
B
uild is successfull and has deployment'
do
context
'
w
hen build starts environment'
do
context
'
b
uild is successfull and has deployment'
do
it
'shows a link for the build'
do
environment
=
create
(
:environment
,
project:
project
)
pipeline
=
create
(
:ci_pipeline
,
project:
project
)
...
...
@@ -242,7 +242,7 @@ feature 'Builds', :feature do
end
end
context
'
B
uild is complete and not successfull'
do
context
'
b
uild is complete and not successfull'
do
it
'shows a link for the build'
do
environment
=
create
(
:environment
,
project:
project
)
pipeline
=
create
(
:ci_pipeline
,
project:
project
)
...
...
@@ -254,7 +254,7 @@ feature 'Builds', :feature do
end
end
context
'
B
uild creates a new deployment'
do
context
'
b
uild creates a new deployment'
do
it
'shows a link to lastest deployment'
do
environment
=
create
(
:environment
,
project:
project
)
create
(
:deployment
,
environment:
environment
,
sha:
project
.
commit
.
id
)
...
...
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