mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Fleet] Always use a SNAPSHOT version when running elastic-agent docker image (#187777)
This commit is contained in:
parent
692b656f9c
commit
834f8fdb37
1 changed files with 5 additions and 1 deletions
|
@ -15,6 +15,10 @@ export async function getLatestVersion(): Promise<string> {
|
|||
return pRetry(() => axios('https://artifacts-api.elastic.co/v1/versions'), {
|
||||
maxRetryTime: 60 * 1000, // 1 minute
|
||||
})
|
||||
.then((response) => last(response.data.versions as string[]) || DEFAULT_VERSION)
|
||||
.then(
|
||||
(response) =>
|
||||
last((response.data.versions as string[]).filter((v) => v.includes('-SNAPSHOT'))) ||
|
||||
DEFAULT_VERSION
|
||||
)
|
||||
.catch(() => DEFAULT_VERSION);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue