Skip to content

Commit 0bfdbc1

Browse files
committed
[CI] Updates bumpmatrix automation for main
1 parent 06128e7 commit 0bfdbc1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

rake_tasks/automation.rake

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,16 @@ namespace :automation do
107107
if file == '.buildkite/pipeline.yml'
108108
require 'yaml'
109109
yaml = YAML.safe_load(content)
110-
branch = version.match(/([0-9]+\.[0-9]+)\.[0-9]+.*/)[1]
111110
yaml_tests_branch = yaml['steps'][0]['env']['ES_YAML_TESTS_BRANCH']
112-
next if yaml_tests_branch == 'main'
113111

114-
content.gsub!(yaml_tests_branch, branch)
112+
if yaml_tests_branch == 'main'
113+
old = content.match(/STACK_VERSION: (.*)/)[1]
114+
new = "STACK_VERSION: #{version}"
115+
content.gsub!(new, old)
116+
else
117+
branch = version.match(/([0-9]+\.[0-9]+)\.[0-9]+.*/)[1]
118+
content.gsub!(yaml_tests_branch, branch)
119+
end
115120
puts "[#{yaml_tests_branch}] -> [#{branch}] in #{file.gsub('./', '')}"
116121
end
117122
match = content.match(regexp)

0 commit comments

Comments
 (0)