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
Jérome Perrin
gitlab-ce
Commits
b86640fe
Commit
b86640fe
authored
Feb 20, 2017
by
dimitrieh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed specs + docs
parent
cd04235e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
12 deletions
+12
-12
app/views/projects/commit/_pipeline.html.haml
app/views/projects/commit/_pipeline.html.haml
+1
-1
doc/api/pipelines.md
doc/api/pipelines.md
+1
-1
lib/api/pipelines.rb
lib/api/pipelines.rb
+2
-2
spec/features/commits_spec.rb
spec/features/commits_spec.rb
+2
-2
spec/features/projects/pipelines/pipeline_spec.rb
spec/features/projects/pipelines/pipeline_spec.rb
+6
-6
No files found.
app/views/projects/commit/_pipeline.html.haml
View file @
b86640fe
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
.pull-right
.pull-right
-
if
can?
(
current_user
,
:update_pipeline
,
pipeline
.
project
)
-
if
can?
(
current_user
,
:update_pipeline
,
pipeline
.
project
)
-
if
pipeline
.
builds
.
latest
.
failed
.
any?
(
&
:retryable?
)
-
if
pipeline
.
builds
.
latest
.
failed
.
any?
(
&
:retryable?
)
=
link_to
"Retry
failed
"
,
retry_namespace_project_pipeline_path
(
pipeline
.
project
.
namespace
,
pipeline
.
project
,
pipeline
.
id
),
class:
'btn btn-grouped btn-primary'
,
method: :post
=
link_to
"Retry"
,
retry_namespace_project_pipeline_path
(
pipeline
.
project
.
namespace
,
pipeline
.
project
,
pipeline
.
id
),
class:
'btn btn-grouped btn-primary'
,
method: :post
-
if
pipeline
.
builds
.
running_or_pending
.
any?
-
if
pipeline
.
builds
.
running_or_pending
.
any?
=
link_to
"Cancel running"
,
cancel_namespace_project_pipeline_path
(
pipeline
.
project
.
namespace
,
pipeline
.
project
,
pipeline
.
id
),
data:
{
confirm:
'Are you sure?'
},
class:
'btn btn-grouped btn-danger'
,
method: :post
=
link_to
"Cancel running"
,
cancel_namespace_project_pipeline_path
(
pipeline
.
project
.
namespace
,
pipeline
.
project
,
pipeline
.
id
),
data:
{
confirm:
'Are you sure?'
},
class:
'btn btn-grouped btn-danger'
,
method: :post
...
...
doc/api/pipelines.md
View file @
b86640fe
...
@@ -163,7 +163,7 @@ Example of response
...
@@ -163,7 +163,7 @@ Example of response
}
}
```
```
## Retry
failed
builds in a pipeline
## Retry builds in a pipeline
> [Introduced][ce-5837] in GitLab 8.11
> [Introduced][ce-5837] in GitLab 8.11
...
...
lib/api/pipelines.rb
View file @
b86640fe
...
@@ -23,7 +23,7 @@ module API
...
@@ -23,7 +23,7 @@ module API
pipelines
=
PipelinesFinder
.
new
(
user_project
).
execute
(
scope:
params
[
:scope
])
pipelines
=
PipelinesFinder
.
new
(
user_project
).
execute
(
scope:
params
[
:scope
])
present
paginate
(
pipelines
),
with:
Entities
::
Pipeline
present
paginate
(
pipelines
),
with:
Entities
::
Pipeline
end
end
desc
'Create a new pipeline'
do
desc
'Create a new pipeline'
do
detail
'This feature was introduced in GitLab 8.14'
detail
'This feature was introduced in GitLab 8.14'
success
Entities
::
Pipeline
success
Entities
::
Pipeline
...
@@ -58,7 +58,7 @@ module API
...
@@ -58,7 +58,7 @@ module API
present
pipeline
,
with:
Entities
::
Pipeline
present
pipeline
,
with:
Entities
::
Pipeline
end
end
desc
'Retry
failed
builds in the pipeline'
do
desc
'Retry builds in the pipeline'
do
detail
'This feature was introduced in GitLab 8.11.'
detail
'This feature was introduced in GitLab 8.11.'
success
Entities
::
Pipeline
success
Entities
::
Pipeline
end
end
...
...
spec/features/commits_spec.rb
View file @
b86640fe
...
@@ -153,7 +153,7 @@ describe 'Commits' do
...
@@ -153,7 +153,7 @@ describe 'Commits' do
expect
(
page
).
to
have_content
pipeline
.
git_author_name
expect
(
page
).
to
have_content
pipeline
.
git_author_name
expect
(
page
).
to
have_link
(
'Download artifacts'
)
expect
(
page
).
to
have_link
(
'Download artifacts'
)
expect
(
page
).
not_to
have_link
(
'Cancel running'
)
expect
(
page
).
not_to
have_link
(
'Cancel running'
)
expect
(
page
).
not_to
have_link
(
'Retry
failed
'
)
expect
(
page
).
not_to
have_link
(
'Retry'
)
end
end
end
end
...
@@ -172,7 +172,7 @@ describe 'Commits' do
...
@@ -172,7 +172,7 @@ describe 'Commits' do
expect
(
page
).
to
have_content
pipeline
.
git_author_name
expect
(
page
).
to
have_content
pipeline
.
git_author_name
expect
(
page
).
not_to
have_link
(
'Download artifacts'
)
expect
(
page
).
not_to
have_link
(
'Download artifacts'
)
expect
(
page
).
not_to
have_link
(
'Cancel running'
)
expect
(
page
).
not_to
have_link
(
'Cancel running'
)
expect
(
page
).
not_to
have_link
(
'Retry
failed
'
)
expect
(
page
).
not_to
have_link
(
'Retry'
)
end
end
end
end
end
end
...
...
spec/features/projects/pipelines/pipeline_spec.rb
View file @
b86640fe
...
@@ -54,7 +54,7 @@ describe 'Pipeline', :feature, :js do
...
@@ -54,7 +54,7 @@ describe 'Pipeline', :feature, :js do
expect
(
page
).
to
have_content
(
'Build'
)
expect
(
page
).
to
have_content
(
'Build'
)
expect
(
page
).
to
have_content
(
'Test'
)
expect
(
page
).
to
have_content
(
'Test'
)
expect
(
page
).
to
have_content
(
'Deploy'
)
expect
(
page
).
to
have_content
(
'Deploy'
)
expect
(
page
).
to
have_content
(
'Retry
failed
'
)
expect
(
page
).
to
have_content
(
'Retry'
)
expect
(
page
).
to
have_content
(
'Cancel running'
)
expect
(
page
).
to
have_content
(
'Cancel running'
)
end
end
...
@@ -164,9 +164,9 @@ describe 'Pipeline', :feature, :js do
...
@@ -164,9 +164,9 @@ describe 'Pipeline', :feature, :js do
it
{
expect
(
page
).
not_to
have_content
(
'retried'
)
}
it
{
expect
(
page
).
not_to
have_content
(
'retried'
)
}
context
'when retrying'
do
context
'when retrying'
do
before
{
click_on
'Retry
failed
'
}
before
{
click_on
'Retry'
}
it
{
expect
(
page
).
not_to
have_content
(
'Retry
failed
'
)
}
it
{
expect
(
page
).
not_to
have_content
(
'Retry'
)
}
end
end
end
end
...
@@ -198,7 +198,7 @@ describe 'Pipeline', :feature, :js do
...
@@ -198,7 +198,7 @@ describe 'Pipeline', :feature, :js do
expect
(
page
).
to
have_content
(
build_failed
.
id
)
expect
(
page
).
to
have_content
(
build_failed
.
id
)
expect
(
page
).
to
have_content
(
build_running
.
id
)
expect
(
page
).
to
have_content
(
build_running
.
id
)
expect
(
page
).
to
have_content
(
build_external
.
id
)
expect
(
page
).
to
have_content
(
build_external
.
id
)
expect
(
page
).
to
have_content
(
'Retry
failed
'
)
expect
(
page
).
to
have_content
(
'Retry'
)
expect
(
page
).
to
have_content
(
'Cancel running'
)
expect
(
page
).
to
have_content
(
'Cancel running'
)
expect
(
page
).
to
have_link
(
'Play'
)
expect
(
page
).
to
have_link
(
'Play'
)
end
end
...
@@ -226,9 +226,9 @@ describe 'Pipeline', :feature, :js do
...
@@ -226,9 +226,9 @@ describe 'Pipeline', :feature, :js do
it
{
expect
(
page
).
not_to
have_content
(
'retried'
)
}
it
{
expect
(
page
).
not_to
have_content
(
'retried'
)
}
context
'when retrying'
do
context
'when retrying'
do
before
{
click_on
'Retry
failed
'
}
before
{
click_on
'Retry'
}
it
{
expect
(
page
).
not_to
have_content
(
'Retry
failed
'
)
}
it
{
expect
(
page
).
not_to
have_content
(
'Retry'
)
}
it
{
expect
(
page
).
to
have_selector
(
'.retried'
)
}
it
{
expect
(
page
).
to
have_selector
(
'.retried'
)
}
end
end
end
end
...
...
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