summaryrefslogtreecommitdiff
path: root/app/models/ci/trigger_request.rb
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-08-24 17:08:32 +0900
committerShinya Maeda <shinya@gitlab.com>2017-09-04 21:55:26 +0900
commit75130a41ba19b80ac7b2300721915787ac4681bf (patch)
treee00593f96e419a149e8e3a8c0817174c25a16e45 /app/models/ci/trigger_request.rb
parent970af9964ea9404942818d8c3394d2903955ed69 (diff)
downloadgitlab-ce-75130a41ba19b80ac7b2300721915787ac4681bf.tar.gz
Remove CreateTriggerRequestService and forbit to save variables on Ci::TriggerRequest
Diffstat (limited to 'app/models/ci/trigger_request.rb')
-rw-r--r--app/models/ci/trigger_request.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/ci/trigger_request.rb b/app/models/ci/trigger_request.rb
index c58ce5c3717..4e274a57504 100644
--- a/app/models/ci/trigger_request.rb
+++ b/app/models/ci/trigger_request.rb
@@ -6,6 +6,10 @@ module Ci
belongs_to :pipeline, foreign_key: :commit_id
has_many :builds
+ # Ws swtiched to Ci::PipelineVariable from Ci::TriggerRequest.variables.
+ # Ci::TriggerRequest doesn't save variables anymore.
+ validates :variables, absence: true
+
serialize :variables # rubocop:disable Cop/ActiveRecordSerialize
def user_variables