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
3508948d
Commit
3508948d
authored
Jan 23, 2019
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a new relation between a stage and related bridges
parent
cfbcc191
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
1 deletion
+3
-1
app/models/ci/stage.rb
app/models/ci/stage.rb
+1
-0
lib/gitlab/ci/pipeline/seed/stage.rb
lib/gitlab/ci/pipeline/seed/stage.rb
+1
-1
spec/lib/gitlab/import_export/all_models.yml
spec/lib/gitlab/import_export/all_models.yml
+1
-0
No files found.
app/models/ci/stage.rb
View file @
3508948d
...
@@ -14,6 +14,7 @@ module Ci
...
@@ -14,6 +14,7 @@ module Ci
has_many
:statuses
,
class_name:
'CommitStatus'
,
foreign_key: :stage_id
has_many
:statuses
,
class_name:
'CommitStatus'
,
foreign_key: :stage_id
has_many
:builds
,
foreign_key: :stage_id
has_many
:builds
,
foreign_key: :stage_id
has_many
:bridges
,
foreign_key: :stage_id
with_options
unless: :importing?
do
with_options
unless: :importing?
do
validates
:project
,
presence:
true
validates
:project
,
presence:
true
...
...
lib/gitlab/ci/pipeline/seed/stage.rb
View file @
3508948d
...
@@ -41,7 +41,7 @@ module Gitlab
...
@@ -41,7 +41,7 @@ module Gitlab
::
Ci
::
Stage
.
new
(
attributes
).
tap
do
|
stage
|
::
Ci
::
Stage
.
new
(
attributes
).
tap
do
|
stage
|
seeds
.
each
do
|
seed
|
seeds
.
each
do
|
seed
|
if
seed
.
bridge?
if
seed
.
bridge?
stage
.
status
es
<<
seed
.
to_resource
stage
.
bridg
es
<<
seed
.
to_resource
else
else
stage
.
builds
<<
seed
.
to_resource
stage
.
builds
<<
seed
.
to_resource
end
end
...
...
spec/lib/gitlab/import_export/all_models.yml
View file @
3508948d
...
@@ -138,6 +138,7 @@ stages:
...
@@ -138,6 +138,7 @@ stages:
-
pipeline
-
pipeline
-
statuses
-
statuses
-
builds
-
builds
-
bridges
statuses
:
statuses
:
-
project
-
project
-
pipeline
-
pipeline
...
...
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