Skip to content

Commit 824a99d

Browse files
committed
[CI] Adjusts downloading artifacts for main
1 parent e8b2504 commit 824a99d

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ jobs:
4141
- name: elasticsearch
4242
run: cd elasticsearch && bundle exec rake test:all
4343
- name: elasticsearch-api
44-
run: rake es:download_artifacts[9.3.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:all
44+
run: rake es:download_artifacts[main] && cd elasticsearch-api && bundle exec rake test:all

.github/workflows/otel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
- name: elasticsearch
4444
run: cd elasticsearch && bundle exec rake test:all
4545
- name: elasticsearch-api
46-
run: rake es:download_artifacts[9.3.0-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:all
46+
run: rake es:download_artifacts[main] && cd elasticsearch-api && bundle exec rake test:all

rake_tasks/elasticsearch_tasks.rake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,13 @@ namespace :es do
8989
# works in new API.
9090
#
9191
# Get the latest minor from version number, and get latest snapshot
92-
major_minor = version_number.split('.')[0..1].join('.')
92+
major_minor = if version_number == 'main'
93+
'master'
94+
else
95+
version_number.split('.')[0..1].join('.')
96+
end
9397
url = URI("https://artifacts-snapshot.elastic.co/elasticsearch/latest/#{major_minor}.json")
98+
9499
manifest_url = JSON.parse(Net::HTTP.get(url))['manifest_url']
95100
download_file!(manifest_url, json_filename)
96101

0 commit comments

Comments
 (0)