Skip to content

Commit d7be3d5

Browse files
committed
[CI] Updates automation for bumping stack_version in test matrices
1 parent 5bbef2d commit d7be3d5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

rake_tasks/automation.rake

+4-5
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ namespace :automation do
9898
task :bumpmatrix, :version do |_, args|
9999
abort('[!] Required argument [version] missing') unless (version = args[:version])
100100
gh_actions = Dir.glob(File.expand_path('../.github/workflows/*.yml', __dir__))
101-
102101
files = gh_actions + ['.buildkite/pipeline.yml']
103102
regexp = Regexp.new(/([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}?+(-SNAPSHOT)?)/)
104103
files.each do |file|
@@ -108,10 +107,10 @@ namespace :automation do
108107
yaml = YAML.safe_load(content)
109108
branch = version.match(/([0-9]+\.[0-9]+)\.[0-9]+.*/)[1]
110109
yaml_tests_branch = yaml['steps'][1]['env']['ES_YAML_TESTS_BRANCH']
111-
next if yaml_tests_branch == 'main'
112-
113-
content.gsub!(yaml_tests_branch, branch)
114-
puts "[#{yaml_tests_branch}] -> [#{branch}] in #{file.gsub('./', '')}"
110+
unless ['main', '8.x'].include? yaml_tests_branch
111+
content.gsub!(yaml_tests_branch, branch)
112+
puts "[#{yaml_tests_branch}] -> [#{branch}] in #{file.gsub('./', '')}"
113+
end
115114
end
116115
match = content.match(regexp)
117116
next if match.nil?

0 commit comments

Comments
 (0)