Welcome to mirror list, hosted at ThFree Co, Russian Federation.

update_job_metrics_tag « bin « tooling - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: affb62cd423abfe8bcdfe52bc2138904707c2500 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env ruby
# frozen_string_literal: true

require_relative '../lib/tooling/job_metrics'

unless ENV['CI_JOB_METRICS_ENABLED'] == 'true'
  puts "[job-metrics] Feature disabled because CI_JOB_METRICS_ENABLED is not set to true."
  exit 0
end

tag_name  = ARGV.shift
tag_value = ARGV.shift

if tag_name.nil? || tag_value.nil?
  puts 'usage: update_job_metric_tag <tag_name> <tag_value>'
  exit 1
end

puts "[job-metrics] Updating job metrics tag for the CI/CD job."
Tooling::JobMetrics.new.update_tag(tag_name, tag_value)