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

fix: make docker namespace configurable (#560) backport for 7.10.x #562

Merged
merged 1 commit into from
Jan 7, 2021
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2.3'
services:
elastic-agent:
image: docker.elastic.co/beats/elastic-agent${elasticAgentDockerImageSuffix}:${elasticAgentTag:-7.10-SNAPSHOT}
image: docker.elastic.co/${elasticAgentDockerNamespace:-beats}/elastic-agent${elasticAgentDockerImageSuffix}:${elasticAgentTag:-7.10-SNAPSHOT}
container_name: ${elasticAgentContainerName}
depends_on:
elasticsearch:
Expand Down
2 changes: 1 addition & 1 deletion cli/config/compose/services/metricbeat/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
]
environment:
- BEAT_STRICT_PERMS=${beatStricPerms:-false}
image: "docker.elastic.co/beats/metricbeat:${metricbeatTag:-7.10-SNAPSHOT}"
image: "docker.elastic.co/${metricbeatDockerNamespace:-beats}/metricbeat:${metricbeatTag:-7.10-SNAPSHOT}"
labels:
co.elastic.logs/module: "${serviceName}"
volumes:
Expand Down
7 changes: 7 additions & 0 deletions e2e/_suites/fleet/stand-alone.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/cucumber/godog"
"github.com/elastic/e2e-testing/cli/docker"
"github.com/elastic/e2e-testing/cli/services"
"github.com/elastic/e2e-testing/cli/shell"
"github.com/elastic/e2e-testing/e2e"
log "github.com/sirupsen/logrus"
)
Expand Down Expand Up @@ -69,6 +70,12 @@ func (sats *StandAloneTestSuite) aStandaloneAgentIsDeployed(image string) error
profileEnv["elasticAgentDockerImageSuffix"] = "-" + image
}

profileEnv["elasticAgentDockerNamespace"] = "beats"
useCISnapshots, _ := shell.GetEnvBool("ELASTIC_AGENT_USE_CI_SNAPSHOTS")
if useCISnapshots {
profileEnv["elasticAgentDockerNamespace"] = "observability-ci"
}

containerName := fmt.Sprintf("%s_%s_%d", FleetProfileName, ElasticAgentServiceName, 1)

configurationFileURL := "https://github.com/raw/elastic/beats/master/x-pack/elastic-agent/elastic-agent.docker.yml"
Expand Down
6 changes: 6 additions & 0 deletions e2e/_suites/metricbeat/metricbeat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,12 @@ func (mts *MetricbeatTestSuite) runMetricbeatService() error {
"serviceName": mts.ServiceName,
}

env["metricbeatDockerNamespace"] = "beats"
useCISnapshots, _ := shell.GetEnvBool("ELASTIC_AGENT_USE_CI_SNAPSHOTS")
if useCISnapshots {
env["metricbeatDockerNamespace"] = "observability-ci"
}

err := serviceManager.AddServicesToCompose("metricbeat", []string{"metricbeat"}, env)
if err != nil {
log.WithFields(log.Fields{
Expand Down