Class: Gitlab::Ci::Pipeline::Chain::Skip

Inherits:
Base
  • Object
show all
Includes:
Utils::StrongMemoize
Defined in:
lib/gitlab/ci/pipeline/chain/skip.rb

Constant Summary collapse

SKIP_PATTERN =
/\[(ci[ _-]skip|skip[ _-]ci)\]/i.freeze

Instance Attribute Summary

Attributes inherited from Base

#command, #config, #pipeline

Instance Method Summary collapse

Methods included from Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

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)

22
23
24
# File 'lib/gitlab/ci/pipeline/chain/skip.rb', line 22

def break?
  skipped?
end

#perform!Object


12
13
14
15
16
# File 'lib/gitlab/ci/pipeline/chain/skip.rb', line 12

def perform!
  if skipped?
    @pipeline.skip if @command.save_incompleted
  end
end

#skipped?Boolean

Returns:

  • (Boolean)

18
19
20
# File 'lib/gitlab/ci/pipeline/chain/skip.rb', line 18

def skipped?
  !@command.ignore_skip_ci && (commit_message_skips_ci? || push_option_skips_ci?)
end