BigW Consortium Gitlab

Commit cdcc196c by Grzegorz Bizon

Make it possible to access deployment details from pipeline

parent 5ce9e03f
......@@ -31,6 +31,7 @@ module Ci
has_many :auto_canceled_jobs, class_name: 'CommitStatus', foreign_key: 'auto_canceled_by_id'
delegate :id, to: :project, prefix: true
delegate :deployment_variables, to: :project, prefix: true
validates :source, exclusion: { in: %w(unknown), unless: :importing? }, on: :create
validates :sha, presence: { unless: :importing? }
......
......@@ -27,6 +27,14 @@ describe Ci::Pipeline, :mailer do
it { is_expected.to respond_to :git_author_email }
it { is_expected.to respond_to :short_sha }
describe '#project_deployment_variables' do
it 'delegates deployment variables to project' do
expect(pipeline)
.to delegate_method(:deployment_variables)
.to(:project).with_prefix
end
end
describe '#source' do
context 'when creating new pipeline' do
let(:pipeline) do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment