Skip to content

Commit d574d0f

Browse files
committed
Automation: Updates bumpmatrix task
Fixes getting yaml tests branch since previous step was removed from Buildkite pipeline. Exit loop if new version equals old version
1 parent eaa00a6 commit d574d0f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rake_tasks/automation.rake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ namespace :automation do
107107
require 'yaml'
108108
yaml = YAML.safe_load(content)
109109
branch = version.match(/([0-9]+\.[0-9]+)\.[0-9]+.*/)[1]
110-
yaml_tests_branch = yaml['steps'][1]['env']['ES_YAML_TESTS_BRANCH']
110+
yaml_tests_branch = yaml['steps'][0]['env']['ES_YAML_TESTS_BRANCH']
111111
next if yaml_tests_branch == 'main'
112112

113113
content.gsub!(yaml_tests_branch, branch)
@@ -117,6 +117,8 @@ namespace :automation do
117117
next if match.nil?
118118

119119
old_version = match[1]
120+
next if old_version == args[:version]
121+
120122
content.gsub!(old_version, args[:version])
121123
puts "[#{old_version}] -> [#{version}] in #{file.gsub('./', '')}"
122124
File.open(file, 'w') { |f| f.puts content }

0 commit comments

Comments
 (0)