File tree 1 file changed +6
-13
lines changed
.buildkite/scripts/health-report-tests
1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change 12
12
13
13
14
14
class Bootstrap :
15
- ELASTIC_STACK_VERSIONS_URL = "https://artifacts-api.elastic.co/v1/versions "
15
+ ELASTIC_STACK_RELEASED_VERSION_URL = "https://storage.googleapis.com/ artifacts-api/releases/current/ "
16
16
17
17
def __init__ (self ) -> None :
18
18
f"""
@@ -43,20 +43,13 @@ def __init__(self) -> None:
43
43
f"rerun again" )
44
44
45
45
def __resolve_latest_stack_version_for (self , major_version : str ) -> str :
46
- resolved_version = ""
47
- response = util .call_url_with_retry (self .ELASTIC_STACK_VERSIONS_URL )
48
- release_versions = response .json ()["versions" ]
49
- for release_version in reversed (release_versions ):
50
- if release_version .find ("SNAPSHOT" ) > 0 :
51
- continue
52
- if release_version .split ("." )[0 ] == major_version :
53
- print (f"Resolved latest version for { major_version } is { release_version } ." )
54
- resolved_version = release_version
55
- break
46
+ resp = util .call_url_with_retry (self .ELASTIC_STACK_RELEASED_VERSION_URL + major_version )
47
+ release_version = resp .text .strip ()
48
+ print (f"Resolved latest version for { major_version } is { release_version } ." )
56
49
57
- if resolved_version == "" :
50
+ if release_version == "" :
58
51
raise ValueError (f"Cannot resolve latest version for { major_version } major" )
59
- return resolved_version
52
+ return release_version
60
53
61
54
def install_plugin (self , plugin_path : str ) -> None :
62
55
util .run_or_raise_error (
You can’t perform that action at this time.
0 commit comments