Class: Gitlab::Ci::Config::Entry::Need

Inherits:
Gitlab::Config::Entry::Simplifiable show all
Defined in:
lib/gitlab/ci/config/entry/need.rb

Defined Under Namespace

Classes: CrossPipelineDependency, JobHash, JobString, UnknownStrategy

Instance Attribute Summary

Attributes inherited from Gitlab::Config::Entry::Simplifiable

#subject

Class Method Summary collapse

Methods inherited from Gitlab::Config::Entry::Simplifiable

default, entry_class, #initialize, strategies, strategy

Constructor Details

This class inherits a constructor from Gitlab::Config::Entry::Simplifiable

Class Method Details

.cross_pipeline_need?(config) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/gitlab/ci/config/entry/need.rb', line 21

def self.cross_pipeline_need?(config)
  config.key?(:job) && config.key?(:pipeline) && !config.key?(:project)
end

.same_pipeline_need?(config) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
19
# File 'lib/gitlab/ci/config/entry/need.rb', line 16

def self.same_pipeline_need?(config)
  config.key?(:job) &&
    !(config.key?(:project) || config.key?(:ref) || config.key?(:pipeline))
end