summaryrefslogtreecommitdiff
path: root/app/models/ci/pipeline_variable.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ci/pipeline_variable.rb')
-rw-r--r--app/models/ci/pipeline_variable.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/ci/pipeline_variable.rb b/app/models/ci/pipeline_variable.rb
new file mode 100644
index 00000000000..00b419c3efa
--- /dev/null
+++ b/app/models/ci/pipeline_variable.rb
@@ -0,0 +1,10 @@
+module Ci
+ class PipelineVariable < ActiveRecord::Base
+ extend Ci::Model
+ include HasVariable
+
+ belongs_to :pipeline
+
+ validates :key, uniqueness: { scope: :pipeline_id }
+ end
+end