summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/pipeline/chain/build.rb
blob: 70732d26bbd573c10e905f7516247ba2c3645709 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module Gitlab
  module Ci
    module Pipeline
      module Chain
        class Build < Chain::Base
          def perform!
            @pipeline.assign_attributes(
              source: @command.source,
              project: @command.project,
              ref: @command.ref,
              sha: @command.sha,
              before_sha: @command.before_sha,
              tag: @command.tag_exists?,
              trigger_requests: Array(@command.trigger_request),
              user: @command.current_user,
              pipeline_schedule: @command.schedule,
              protected: @command.protected_ref?
            )

            @pipeline.set_config_source
          end

          def break?
            false
          end
        end
      end
    end
  end
end