Class: Gitlab::Ci::Pipeline::Chain::Metrics

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

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)

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

def break?
  false
end

#counterObject


16
17
18
# File 'lib/gitlab/ci/pipeline/chain/metrics.rb', line 16

def counter
  ::Gitlab::Ci::Pipeline::Metrics.new.pipelines_created_counter
end

#perform!Object


8
9
10
# File 'lib/gitlab/ci/pipeline/chain/metrics.rb', line 8

def perform!
  counter.increment(source: @pipeline.source)
end