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