Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/ci/pipeline/chain/build.rb')
-rw-r--r--lib/gitlab/ci/pipeline/chain/build.rb28
1 files changed, 1 insertions, 27 deletions
diff --git a/lib/gitlab/ci/pipeline/chain/build.rb b/lib/gitlab/ci/pipeline/chain/build.rb
index d3bc3a38f1f..6feb693221b 100644
--- a/lib/gitlab/ci/pipeline/chain/build.rb
+++ b/lib/gitlab/ci/pipeline/chain/build.rb
@@ -5,9 +5,6 @@ module Gitlab
module Pipeline
module Chain
class Build < Chain::Base
- include Gitlab::Allowable
- include Chain::Helpers
-
def perform!
@pipeline.assign_attributes(
source: @command.source,
@@ -23,35 +20,12 @@ module Gitlab
pipeline_schedule: @command.schedule,
merge_request: @command.merge_request,
external_pull_request: @command.external_pull_request,
- locked: @command.project.default_pipeline_lock,
- variables_attributes: variables_attributes
- )
+ locked: @command.project.default_pipeline_lock)
end
def break?
@pipeline.errors.any?
end
-
- private
-
- def variables_attributes
- variables = Array(@command.variables_attributes)
-
- # We allow parent pipelines to pass variables to child pipelines since
- # these variables are coming from internal configurations. We will check
- # permissions to :set_pipeline_variables when those are injected upstream,
- # to the parent pipeline.
- # In other scenarios (e.g. multi-project pipelines or run pipeline via UI)
- # the variables are provided from the outside and those should be guarded.
- return variables if @command.creates_child_pipeline?
-
- if variables.present? && !can?(@command.current_user, :set_pipeline_variables, @command.project)
- error("Insufficient permissions to set pipeline variables")
- variables = []
- end
-
- variables
- end
end
end
end