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
3577b57f
Commit
3577b57f
authored
Jun 03, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to use `pipeline` where applicable
parent
717fdd6d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
app/models/ci/build.rb
app/models/ci/build.rb
+6
-6
app/models/commit_status.rb
app/models/commit_status.rb
+1
-1
lib/gitlab/build_data_builder.rb
lib/gitlab/build_data_builder.rb
+1
-1
spec/factories/ci/builds.rb
spec/factories/ci/builds.rb
+1
-1
spec/factories/commit_statuses.rb
spec/factories/commit_statuses.rb
+1
-1
No files found.
app/models/ci/build.rb
View file @
3577b57f
...
...
@@ -118,12 +118,12 @@ module Ci
.
reorder
(
iid: :asc
)
merge_requests
.
find
do
|
merge_request
|
merge_request
.
commits
.
any?
{
|
ci
|
ci
.
id
==
commit
.
sha
}
merge_request
.
commits
.
any?
{
|
ci
|
ci
.
id
==
pipeline
.
sha
}
end
end
def
project_id
commit
.
project
.
id
pipeline
.
project_
id
end
def
project_name
...
...
@@ -359,8 +359,8 @@ module Ci
end
def
global_yaml_variables
if
commit
.
config_processor
commit
.
config_processor
.
global_variables
.
map
do
|
key
,
value
|
if
pipeline
.
config_processor
pipeline
.
config_processor
.
global_variables
.
map
do
|
key
,
value
|
{
key:
key
,
value:
value
,
public:
true
}
end
else
...
...
@@ -369,8 +369,8 @@ module Ci
end
def
job_yaml_variables
if
commit
.
config_processor
commit
.
config_processor
.
job_variables
(
name
).
map
do
|
key
,
value
|
if
pipeline
.
config_processor
pipeline
.
config_processor
.
job_variables
(
name
).
map
do
|
key
,
value
|
{
key:
key
,
value:
value
,
public:
true
}
end
else
...
...
app/models/commit_status.rb
View file @
3577b57f
...
...
@@ -55,7 +55,7 @@ class CommitStatus < ActiveRecord::Base
delegate
:sha
,
:short_sha
,
to: :commit
def
before_sha
commit
.
before_sha
||
Gitlab
::
Git
::
BLANK_SHA
pipeline
.
before_sha
||
Gitlab
::
Git
::
BLANK_SHA
end
def
self
.
stages
...
...
lib/gitlab/build_data_builder.rb
View file @
3577b57f
...
...
@@ -3,7 +3,7 @@ module Gitlab
class
<<
self
def
build
(
build
)
project
=
build
.
project
commit
=
build
.
commit
commit
=
build
.
pipeline
user
=
build
.
user
data
=
{
...
...
spec/factories/ci/builds.rb
View file @
3577b57f
...
...
@@ -43,7 +43,7 @@ FactoryGirl.define do
end
after
(
:build
)
do
|
build
,
evaluator
|
build
.
project
=
build
.
commit
.
project
build
.
project
=
build
.
pipeline
.
project
end
factory
:ci_not_started_build
do
...
...
spec/factories/commit_statuses.rb
View file @
3577b57f
...
...
@@ -8,7 +8,7 @@ FactoryGirl.define do
finished_at
'Tue, 26 Jan 2016 08:23:42 +0100'
after
(
:build
)
do
|
build
,
evaluator
|
build
.
project
=
build
.
commit
.
project
build
.
project
=
build
.
pipeline
.
project
end
factory
:generic_commit_status
,
class:
GenericCommitStatus
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