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

Commit

Permalink
fix: only add the platform label for local or CI snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Feb 19, 2021
1 parent 39a9b0c commit 1f29a34
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion e2e/_suites/fleet/stand-alone.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ func (sats *StandAloneTestSuite) contributeSteps(s *godog.ScenarioContext) {
func (sats *StandAloneTestSuite) aStandaloneAgentIsDeployed(image string) error {
log.Trace("Deploying an agent to Fleet")

dockerImageTag := agentVersion

useCISnapshots := shell.GetEnvBool("BEATS_USE_CI_SNAPSHOTS")
beatsLocalPath := shell.GetEnv("BEATS_LOCAL_PATH", "")
if useCISnapshots || beatsLocalPath != "" {
Expand All @@ -72,6 +74,8 @@ func (sats *StandAloneTestSuite) aStandaloneAgentIsDeployed(image string) error
dockerInstaller := GetElasticAgentInstaller("docker", image, agentVersion)

dockerInstaller.PreInstallFn()

dockerImageTag += "-amd64"
}

serviceManager := services.NewServiceManager()
Expand All @@ -96,7 +100,7 @@ func (sats *StandAloneTestSuite) aStandaloneAgentIsDeployed(image string) error
profileEnv["elasticAgentContainerName"] = containerName
profileEnv["elasticAgentConfigFile"] = sats.AgentConfigFilePath
profileEnv["elasticAgentPlatform"] = "linux/amd64"
profileEnv["elasticAgentTag"] = agentVersion + "-amd64"
profileEnv["elasticAgentTag"] = dockerImageTag

err = serviceManager.AddServicesToCompose(context.Background(), FleetProfileName, []string{ElasticAgentServiceName}, profileEnv)
if err != nil {
Expand Down

0 comments on commit 1f29a34

Please sign in to comment.