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
5b52da9c
Commit
5b52da9c
authored
Aug 16, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert unrelevant changes
parent
7cdb5173
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
22 deletions
+18
-22
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+3
-2
spec/helpers/notes_helper_spec.rb
spec/helpers/notes_helper_spec.rb
+1
-2
spec/models/build_spec.rb
spec/models/build_spec.rb
+14
-18
No files found.
app/models/ci/pipeline.rb
View file @
5b52da9c
...
@@ -250,8 +250,9 @@ module Ci
...
@@ -250,8 +250,9 @@ module Ci
end
end
def
execute_hooks
def
execute_hooks
project
.
execute_hooks
(
pipeline_data
,
:pipeline_hooks
)
data
=
pipeline_data
project
.
execute_services
(
pipeline_data
,
:pipeline_hooks
)
project
.
execute_hooks
(
data
,
:pipeline_hooks
)
project
.
execute_services
(
data
,
:pipeline_hooks
)
end
end
private
private
...
...
spec/helpers/notes_helper_spec.rb
View file @
5b52da9c
...
@@ -39,8 +39,7 @@ describe NotesHelper do
...
@@ -39,8 +39,7 @@ describe NotesHelper do
describe
'#preload_max_access_for_authors'
do
describe
'#preload_max_access_for_authors'
do
before
do
before
do
# #preload_max_access_for_authors would read cache from RequestStore,
# This method reads cache from RequestStore, so make sure it's clean.
# so we should make sure it's clean.
RequestStore
.
clear!
RequestStore
.
clear!
end
end
...
...
spec/models/build_spec.rb
View file @
5b52da9c
...
@@ -275,8 +275,7 @@ describe Ci::Build, models: true do
...
@@ -275,8 +275,7 @@ describe Ci::Build, models: true do
context
'when yaml_variables are undefined'
do
context
'when yaml_variables are undefined'
do
before
do
before
do
build
.
update
(
yaml_variables:
nil
)
build
.
yaml_variables
=
nil
build
.
reload
# reload pipeline so that it resets config_processor
end
end
context
'use from gitlab-ci.yml'
do
context
'use from gitlab-ci.yml'
do
...
@@ -424,10 +423,9 @@ describe Ci::Build, models: true do
...
@@ -424,10 +423,9 @@ describe Ci::Build, models: true do
describe
'#stuck?'
do
describe
'#stuck?'
do
subject
{
build
.
stuck?
}
subject
{
build
.
stuck?
}
%w[pending]
.
each
do
|
state
|
context
"when commit_status.status is pending"
do
context
"when commit_status.status is
#{
state
}
"
do
before
do
before
do
build
.
status
=
state
build
.
status
=
'pending'
end
end
it
{
is_expected
.
to
be_truthy
}
it
{
is_expected
.
to
be_truthy
}
...
@@ -443,7 +441,6 @@ describe Ci::Build, models: true do
...
@@ -443,7 +441,6 @@ describe Ci::Build, models: true do
it
{
is_expected
.
to
be_falsey
}
it
{
is_expected
.
to
be_falsey
}
end
end
end
end
end
%w[success failed canceled running]
.
each
do
|
state
|
%w[success failed canceled running]
.
each
do
|
state
|
context
"when commit_status.status is
#{
state
}
"
do
context
"when commit_status.status is
#{
state
}
"
do
...
@@ -904,8 +901,7 @@ describe Ci::Build, models: true do
...
@@ -904,8 +901,7 @@ describe Ci::Build, models: true do
context
'when `when` is undefined'
do
context
'when `when` is undefined'
do
before
do
before
do
build
.
update
(
when:
nil
)
build
.
when
=
nil
build
.
reload
# reload pipeline so that it resets config_processor
end
end
context
'use from gitlab-ci.yml'
do
context
'use from gitlab-ci.yml'
do
...
...
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