summaryrefslogtreecommitdiff
path: root/app/models/ci/sources/pipeline.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-05-24 16:03:53 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2017-06-05 12:31:47 +0200
commit73557c66f0cd7ad1937ae66ae475aa7cb822d480 (patch)
tree33a1d9c192084d0b493f8eed67c49104282bde59 /app/models/ci/sources/pipeline.rb
parent65581fad5e26fdf2612c098a7fbc48a53aae5e28 (diff)
downloadgitlab-ce-cross-project-triggers.tar.gz
Add triggerer to pipeline to support relation between dependent pipelinescross-project-triggers
Diffstat (limited to 'app/models/ci/sources/pipeline.rb')
-rw-r--r--app/models/ci/sources/pipeline.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/models/ci/sources/pipeline.rb b/app/models/ci/sources/pipeline.rb
new file mode 100644
index 00000000000..718a163d70f
--- /dev/null
+++ b/app/models/ci/sources/pipeline.rb
@@ -0,0 +1,14 @@
+module Ci
+ module Sources
+ class Pipeline < ActiveRecord::Base
+ self.table_name = "ci_sources_pipelines"
+
+ belongs_to :project, class_name: Project
+ belongs_to :pipeline, class_name: Ci::Pipeline
+
+ belongs_to :source_project, class_name: Project, foreign_key: :source_project_id
+ belongs_to :source_job, class_name: Ci::Build, foreign_key: :source_job_id
+ belongs_to :source_pipeline, class_name: Ci::Pipeline, foreign_key: :source_pipeline_id
+ end
+ end
+end