Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

fix: calculate bucket path properly #318

Merged
merged 1 commit into from
Sep 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions e2e/_suites/ingest-manager/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,14 @@ func downloadAgentBinary(artifact string, version string, OS string, arch string
object := fmt.Sprintf("snapshots/%s", fileName)

// we are setting a version from a pull request: the version of the artifact will be kept as the base one
// i.e. /pull-requests/pr-21100/elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm
// i.e. /pull-requests/pr-21100/elastic-agent-8.0.0-SNAPSHOT-amd64.deb
// i.e. /pull-requests/pr-21100/elastic-agent/elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm
// i.e. /pull-requests/pr-21100/elastic-agent/elastic-agent-8.0.0-SNAPSHOT-amd64.deb
if strings.HasPrefix(version, "pr-") {
log.WithField("PR", version).Debug("Using CI snapshots a pull request")
fileName = fmt.Sprintf("%s-%s-%s.%s", artifact, agentVersionBase, arch, extension)
log.WithFields(log.Fields{
"agentVersion": agentVersionBase,
"PR": version,
}).Debug("Using CI snapshots for a pull request")
object = fmt.Sprintf("pull-requests/%s/%s/%s", version, artifact, fileName)
}

Expand Down