summaryrefslogtreecommitdiff
path: root/app/models/ci/stage.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-06-02 12:16:11 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-06-02 12:16:11 +0200
commitfe0b2f81c7c9680a11288e0cdffc3e80dc1e8d58 (patch)
treefd19bea3c1118cb7438f0d2476bad322ccb5c421 /app/models/ci/stage.rb
parentaa0d6b07b6a87459e75c69111643b9d6fe8a97c2 (diff)
downloadgitlab-ce-fe0b2f81c7c9680a11288e0cdffc3e80dc1e8d58.tar.gz
Refine implementation of pipeline stage seeds
Diffstat (limited to 'app/models/ci/stage.rb')
-rw-r--r--app/models/ci/stage.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/ci/stage.rb b/app/models/ci/stage.rb
new file mode 100644
index 00000000000..59570924c8d
--- /dev/null
+++ b/app/models/ci/stage.rb
@@ -0,0 +1,11 @@
+module Ci
+ class Stage < ActiveRecord::Base
+ extend Ci::Model
+
+ belongs_to :project
+ belongs_to :pipeline
+
+ has_many :statuses, class_name: 'CommitStatus', foreign_key: :commit_id
+ has_many :builds, foreign_key: :commit_id
+ end
+end