Skip to content

Commit

Permalink
fix: calculate bucket path properly (elastic#318)
Browse files Browse the repository at this point in the history
# Conflicts:
#	e2e/_suites/ingest-manager/services.go
  • Loading branch information
mdelapenya committed Sep 22, 2020
1 parent 4742402 commit acc29a9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions e2e/_suites/ingest-manager/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,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-7.9.1-x86_64.rpm
// i.e. /pull-requests/pr-21100/elastic-agent-7.9.1-amd64.deb
// i.e. /pull-requests/pr-21100/elastic-agent/elastic-agent-7.9.1-x86_64.rpm
// i.e. /pull-requests/pr-21100/elastic-agent/elastic-agent-7.9.1-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

0 comments on commit acc29a9

Please sign in to comment.