Class: Gitlab::Ci::Pipeline::Chain::Build

Inherits:
Base
  • Object
show all
Defined in:
lib/gitlab/ci/pipeline/chain/build.rb,
lib/gitlab/ci/pipeline/chain/build/associations.rb

Defined Under Namespace

Classes: Associations

Instance Attribute Summary

Attributes inherited from Base

#command, #config, #pipeline

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Gitlab::Ci::Pipeline::Chain::Base

Instance Method Details

#break?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/gitlab/ci/pipeline/chain/build.rb', line 26

def break?
  @pipeline.errors.any?
end

#perform!Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/gitlab/ci/pipeline/chain/build.rb', line 8

def perform!
  @pipeline.assign_attributes(
    source: @command.source,
    project: @command.project,
    ref: @command.ref,
    sha: @command.sha,
    before_sha: @command.before_sha,
    source_sha: @command.source_sha,
    target_sha: @command.target_sha,
    tag: @command.tag_exists?,
    trigger_requests: Array(@command.trigger_request),
    user: @command.current_user,
    pipeline_schedule: @command.schedule,
    merge_request: @command.merge_request,
    external_pull_request: @command.external_pull_request,
    locked: @command.project.default_pipeline_lock)
end