Skip to content

Commit 7c3e72a

Browse files
committed
[CI] Artifact task remove unnecessary build_hash
1 parent c499cdb commit 7c3e72a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

rake_tasks/elasticsearch_tasks.rake

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@ namespace :elasticsearch do
8383
exit 1
8484
end
8585

86-
# Get the build hash if it hasn't been set from a running cluster
87-
@build_hash ||= artifacts['version']['builds'].first.dig('projects', 'elasticsearch', 'commit_hash')
88-
86+
# Either find the artifacts for the exact same build hash from the current running cluster or
87+
# use the first one from the list of builds:
8988
build_hash_artifact = artifacts['version']['builds'].find do |build|
9089
build.dig('projects', 'elasticsearch', 'commit_hash') == @build_hash
9190
end || artifacts['version']['builds'].first

0 commit comments

Comments
 (0)