We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4189056 commit 97a5c7cCopy full SHA for 97a5c7c
rake_tasks/automation.rake
@@ -104,10 +104,14 @@ namespace :automation do
104
files.each do |file|
105
content = File.read(file)
106
if file == '.buildkite/pipeline.yml'
107
+ require 'yaml'
108
+ yaml = YAML.safe_load(content)
109
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)
110
- puts "[#{old_branch}] -> [#{branch}] in #{file.gsub('./', '')}"
+ 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('./', '')}"
115
end
116
match = content.match(regexp)
117
next if match.nil?
0 commit comments