From 2bacaf34519b224bfe9d234a7e4d94a0742989bb Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Mon, 2 Sep 2024 10:48:24 +0100 Subject: [PATCH] [CI] Updates YAML tests branch in bumpmatrix --- rake_tasks/automation.rake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rake_tasks/automation.rake b/rake_tasks/automation.rake index f319f4af0..d12c14561 100644 --- a/rake_tasks/automation.rake +++ b/rake_tasks/automation.rake @@ -103,6 +103,12 @@ namespace :automation do regexp = Regexp.new(/([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}?+(-SNAPSHOT)?)/) files.each do |file| content = File.read(file) + if file == '.buildkite/pipeline.yml' + branch = version.match(/([0-9]+\.[0-9]+)\.[0-9]+.*/)[1] + old_branch = content.match(/ES_YAML_TESTS_BRANCH: ([0-9.]+)/)[1] + content.gsub!(old_branch, branch) + puts "[#{old_branch}] -> [#{branch}] in #{file.gsub('./', '')}" + end match = content.match(regexp) next if match.nil?