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
Tatuya Kamada
gitlab-ce
Commits
921c356b
Commit
921c356b
authored
Jun 07, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename commit to pipeline in TriggerRequest
parent
30ee4ea6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
app/models/ci/trigger_request.rb
app/models/ci/trigger_request.rb
+1
-1
app/services/ci/create_trigger_request_service.rb
app/services/ci/create_trigger_request_service.rb
+1
-1
spec/models/build_spec.rb
spec/models/build_spec.rb
+1
-1
spec/requests/ci/api/builds_spec.rb
spec/requests/ci/api/builds_spec.rb
+1
-1
No files found.
app/models/ci/trigger_request.rb
View file @
921c356b
...
@@ -3,7 +3,7 @@ module Ci
...
@@ -3,7 +3,7 @@ module Ci
extend
Ci
::
Model
extend
Ci
::
Model
belongs_to
:trigger
,
class_name:
'Ci::Trigger'
belongs_to
:trigger
,
class_name:
'Ci::Trigger'
belongs_to
:
commit
,
class_name:
'Ci::Pipeline'
,
foreign_key: :commit_id
belongs_to
:
pipeline
,
class_name:
'Ci::Pipeline'
,
foreign_key: :commit_id
has_many
:builds
,
class_name:
'Ci::Build'
has_many
:builds
,
class_name:
'Ci::Build'
serialize
:variables
serialize
:variables
...
...
app/services/ci/create_trigger_request_service.rb
View file @
921c356b
...
@@ -11,7 +11,7 @@ module Ci
...
@@ -11,7 +11,7 @@ module Ci
trigger_request
=
trigger
.
trigger_requests
.
create!
(
trigger_request
=
trigger
.
trigger_requests
.
create!
(
variables:
variables
,
variables:
variables
,
commit
:
pipeline
,
pipeline
:
pipeline
,
)
)
if
pipeline
.
create_builds
(
nil
,
trigger_request
)
if
pipeline
.
create_builds
(
nil
,
trigger_request
)
...
...
spec/models/build_spec.rb
View file @
921c356b
...
@@ -219,7 +219,7 @@ describe Ci::Build, models: true do
...
@@ -219,7 +219,7 @@ describe Ci::Build, models: true do
context
'and trigger variables'
do
context
'and trigger variables'
do
let
(
:trigger
)
{
create
(
:ci_trigger
,
project:
project
)
}
let
(
:trigger
)
{
create
(
:ci_trigger
,
project:
project
)
}
let
(
:trigger_request
)
{
create
(
:ci_trigger_request_with_variables
,
commit
:
pipeline
,
trigger:
trigger
)
}
let
(
:trigger_request
)
{
create
(
:ci_trigger_request_with_variables
,
pipeline
:
pipeline
,
trigger:
trigger
)
}
let
(
:trigger_variables
)
do
let
(
:trigger_variables
)
do
[
[
{
key: :TRIGGER_KEY
,
value:
'TRIGGER_VALUE'
,
public:
false
}
{
key: :TRIGGER_KEY
,
value:
'TRIGGER_VALUE'
,
public:
false
}
...
...
spec/requests/ci/api/builds_spec.rb
View file @
921c356b
...
@@ -85,7 +85,7 @@ describe Ci::API::API do
...
@@ -85,7 +85,7 @@ describe Ci::API::API do
trigger
=
FactoryGirl
.
create
(
:ci_trigger
,
project:
project
)
trigger
=
FactoryGirl
.
create
(
:ci_trigger
,
project:
project
)
pipeline
=
FactoryGirl
.
create
(
:ci_pipeline
,
project:
project
,
ref:
'master'
)
pipeline
=
FactoryGirl
.
create
(
:ci_pipeline
,
project:
project
,
ref:
'master'
)
trigger_request
=
FactoryGirl
.
create
(
:ci_trigger_request_with_variables
,
commit
:
pipeline
,
trigger:
trigger
)
trigger_request
=
FactoryGirl
.
create
(
:ci_trigger_request_with_variables
,
pipeline
:
pipeline
,
trigger:
trigger
)
pipeline
.
create_builds
(
nil
,
trigger_request
)
pipeline
.
create_builds
(
nil
,
trigger_request
)
project
.
variables
<<
Ci
::
Variable
.
new
(
key:
"SECRET_KEY"
,
value:
"secret_value"
)
project
.
variables
<<
Ci
::
Variable
.
new
(
key:
"SECRET_KEY"
,
value:
"secret_value"
)
...
...
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