diff options
Diffstat (limited to 'lib/gitlab/ci/config/normalizer/matrix_strategy.rb')
-rw-r--r-- | lib/gitlab/ci/config/normalizer/matrix_strategy.rb | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/gitlab/ci/config/normalizer/matrix_strategy.rb b/lib/gitlab/ci/config/normalizer/matrix_strategy.rb index db21274a9ed..2865b2dcdb7 100644 --- a/lib/gitlab/ci/config/normalizer/matrix_strategy.rb +++ b/lib/gitlab/ci/config/normalizer/matrix_strategy.rb @@ -48,18 +48,29 @@ module Gitlab } end - def name_with_details - vars = variables.map { |key, value| "#{key}=#{value}"}.join('; ') + def name + if Gitlab::Ci::Features.new_matrix_job_names_enabled? + name_with_variable_details + else + old_name + end + end + + private - "#{job_name} (#{vars})" + def name_with_variable_details + vars = variables + .values + .compact + .join(', ') + + "#{job_name}: [#{vars}]" end - def name + def old_name "#{job_name} #{instance}/#{total}" end - private - attr_reader :job_name, :instance, :variables, :total end end |