Skip to content

Commit

Permalink
[Fleet] Always use a SNAPSHOT version when running elastic-agent dock…
Browse files Browse the repository at this point in the history
…er image
  • Loading branch information
nchaulet committed Jul 8, 2024
1 parent 62a2faa commit 8ada9e8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion x-pack/test/fleet_cypress/artifact_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 8ada9e8

Please sign in to comment.