Skip to content

Commit

Permalink
[8.15] [Fleet] Always use a SNAPSHOT version when running elastic-age…
Browse files Browse the repository at this point in the history
…nt docker image (#187777) (#187852)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[Fleet] Always use a SNAPSHOT version when running elastic-agent
docker image (#187777)](#187777)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Nicolas
Chaulet","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-09T11:27:20Z","message":"[Fleet]
Always use a SNAPSHOT version when running elastic-agent docker image
(#187777)","sha":"834f8fdb375d0c7eef0de974ae5c0f0c0f19b60a","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","Team:Elastic-Agent-Control-Plane","backport:prev-minor","v8.16.0"],"title":"[Fleet]
Always use a SNAPSHOT version when running elastic-agent docker
image","number":187777,"url":"https://github.com/elastic/kibana/pull/187777","mergeCommit":{"message":"[Fleet]
Always use a SNAPSHOT version when running elastic-agent docker image
(#187777)","sha":"834f8fdb375d0c7eef0de974ae5c0f0c0f19b60a"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/187777","number":187777,"mergeCommit":{"message":"[Fleet]
Always use a SNAPSHOT version when running elastic-agent docker image
(#187777)","sha":"834f8fdb375d0c7eef0de974ae5c0f0c0f19b60a"}}]}]
BACKPORT-->

Co-authored-by: Nicolas Chaulet <[email protected]>
  • Loading branch information
kibanamachine and nchaulet authored Jul 9, 2024
1 parent a269eb2 commit f6c1ad8
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 f6c1ad8

Please sign in to comment.