From d4826bf077b1615186f3dcdfa38fd79f93ba5df9 Mon Sep 17 00:00:00 2001 From: jordanbreen28 Date: Fri, 8 Dec 2023 09:54:07 +0000 Subject: [PATCH] (maint) - Add --arm flag to matrix_from_metadata --- exe/matrix_from_metadata_v2 | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/exe/matrix_from_metadata_v2 b/exe/matrix_from_metadata_v2 index 2081b2c9..db2e59eb 100755 --- a/exe/matrix_from_metadata_v2 +++ b/exe/matrix_from_metadata_v2 @@ -154,13 +154,16 @@ else os = sup['operatingsystem'] sup['operatingsystemrelease'].sort_by(&:to_i).each do |ver| image_key = "#{os}-#{ver}" - # Add ARM images if they exist and are not excluded - if ARM_IMAGE_TABLE.key?("#{image_key}-arm") && !exclude_list.include?("#{image_key.downcase}-arm") - matrix[:platforms] << { - label: "#{image_key}-arm", - provider: 'provision_service', - image: ARM_IMAGE_TABLE["#{image_key}-arm"] - } + # if --arm is passed, add arm images to the matrix + if ARGV.include?('--arm') + # Add ARM images if they exist and are not excluded + if ARM_IMAGE_TABLE.key?("#{image_key}-arm") && !exclude_list.include?("#{image_key.downcase}-arm") + matrix[:platforms] << { + label: "#{image_key}-arm", + provider: 'provision_service', + image: ARM_IMAGE_TABLE["#{image_key}-arm"] + } + end end if IMAGE_TABLE.key?(image_key) && !exclude_list.include?(image_key.downcase) matrix[:platforms] << {