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
3a3d9996
Commit
3a3d9996
authored
Jul 15, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix stage status shown for pipelines
parent
50abec8c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
6 deletions
+21
-6
CHANGELOG
CHANGELOG
+1
-0
app/views/projects/ci/pipelines/_pipeline.html.haml
app/views/projects/ci/pipelines/_pipeline.html.haml
+1
-1
spec/models/commit_status_spec.rb
spec/models/commit_status_spec.rb
+19
-5
No files found.
CHANGELOG
View file @
3a3d9996
...
...
@@ -58,6 +58,7 @@ v 8.10.0 (unreleased)
- Collapse large diffs by default (!4990)
- Check for conflicts with existing Project's wiki path when creating a new project.
- Show last push widget in upstream after push to fork
- Fix stage status shown for pipelines
- Cache todos pending/done dashboard query counts.
- Don't instantiate a git tree on Projects show default view
- Bump Rinku to 2.0.0
...
...
app/views/projects/ci/pipelines/_pipeline.html.haml
View file @
3a3d9996
...
...
@@ -32,7 +32,7 @@
Cant find HEAD commit for this branch
-
stages_status
=
pipeline
.
statuses
.
stages_status
-
stages_status
=
pipeline
.
statuses
.
latest
.
stages_status
-
stages
.
each
do
|
stage
|
%td
-
status
=
stages_status
[
stage
]
...
...
spec/models/commit_status_spec.rb
View file @
3a3d9996
...
...
@@ -177,10 +177,10 @@ describe CommitStatus, models: true do
describe
'#stages'
do
before
do
FactoryGirl
.
create
:commit_status
,
pipeline:
pipeline
,
stage:
'build
'
,
stage_idx:
0
,
status:
'success'
FactoryGirl
.
create
:commit_status
,
pipeline:
pipeline
,
stage:
'build
'
,
stage_idx:
0
,
status:
'failed'
FactoryGirl
.
create
:commit_status
,
pipeline:
pipeline
,
stage:
'deploy
'
,
stage_idx:
2
,
status:
'running'
FactoryGirl
.
create
:commit_status
,
pipeline:
pipeline
,
stage:
'test
'
,
stage_idx:
1
,
status:
'success'
create
:commit_status
,
pipeline:
pipeline
,
stage:
'build'
,
name:
'linux
'
,
stage_idx:
0
,
status:
'success'
create
:commit_status
,
pipeline:
pipeline
,
stage:
'build'
,
name:
'mac
'
,
stage_idx:
0
,
status:
'failed'
create
:commit_status
,
pipeline:
pipeline
,
stage:
'deploy'
,
name:
'staging
'
,
stage_idx:
2
,
status:
'running'
create
:commit_status
,
pipeline:
pipeline
,
stage:
'test'
,
name:
'rspec
'
,
stage_idx:
1
,
status:
'success'
end
context
'stages list'
do
...
...
@@ -192,7 +192,7 @@ describe CommitStatus, models: true do
end
context
'stages with statuses'
do
subject
{
CommitStatus
.
where
(
pipeline:
pipeline
).
stages_status
}
subject
{
CommitStatus
.
where
(
pipeline:
pipeline
).
latest
.
stages_status
}
it
'return list of stages with statuses'
do
is_expected
.
to
eq
({
...
...
@@ -201,6 +201,20 @@ describe CommitStatus, models: true do
'deploy'
=>
'running'
})
end
context
'when build is retried'
do
before
do
create
:commit_status
,
pipeline:
pipeline
,
stage:
'build'
,
name:
'mac'
,
stage_idx:
0
,
status:
'success'
end
it
'ignores a previous state'
do
is_expected
.
to
eq
({
'build'
=>
'success'
,
'test'
=>
'success'
,
'deploy'
=>
'running'
})
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