Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.
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
15 changes: 13 additions & 2 deletions e2e/_suites/fleet/ingest_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,19 @@ func InitializeIngestManagerTestSuite(ctx *godog.TestSuiteContext) {
}

if !shell.GetEnvBool("SKIP_PULL") {
log.Info("Pulling Docker images...")
docker.PullImages(common.StackVersion, common.AgentVersion, common.KibanaVersion)
images := []string{
"docker.elastic.co/beats/elastic-agent:" + common.AgentVersion,
"docker.elastic.co/beats/elastic-agent-ubi8:" + common.AgentVersion,
"docker.elastic.co/elasticsearch/elasticsearch:" + common.StackVersion,
"docker.elastic.co/kibana/kibana:" + common.KibanaVersion,
"docker.elastic.co/observability-ci/elastic-agent:" + common.AgentVersion,
"docker.elastic.co/observability-ci/elastic-agent-ubi8:" + common.AgentVersion,
"docker.elastic.co/observability-ci/elasticsearch:" + common.StackVersion,
"docker.elastic.co/observability-ci/elasticsearch-ubi8:" + common.StackVersion,
"docker.elastic.co/observability-ci/kibana:" + common.KibanaVersion,
"docker.elastic.co/observability-ci/kibana-ubi8:" + common.KibanaVersion,
}
docker.PullImages(images)
}

common.ProfileEnv["kibanaDockerNamespace"] = "kibana"
Expand Down
16 changes: 3 additions & 13 deletions internal/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,21 +439,11 @@ func getDockerClient() *client.Client {
}

// PullImages pulls images
func PullImages(stackVersion, agentVersion, kibanaVersion string) error {
func PullImages(images []string) error {
c := getDockerClient()
ctx := context.Background()
images := []string{
"docker.elastic.co/beats/elastic-agent:" + agentVersion,
"docker.elastic.co/beats/elastic-agent-ubi8:" + agentVersion,
"docker.elastic.co/elasticsearch/elasticsearch:" + stackVersion,
"docker.elastic.co/kibana/kibana:" + kibanaVersion,
"docker.elastic.co/observability-ci/elastic-agent:" + agentVersion,
"docker.elastic.co/observability-ci/elastic-agent-ubi8:" + agentVersion,
"docker.elastic.co/observability-ci/elasticsearch:" + stackVersion,
"docker.elastic.co/observability-ci/elasticsearch-ubi8:" + stackVersion,
"docker.elastic.co/observability-ci/kibana:" + kibanaVersion,
"docker.elastic.co/observability-ci/kibana-ubi8:" + kibanaVersion,
}

log.WithField("images", images).Info("Pulling Docker images...")
for _, image := range images {
r, err := c.ImagePull(ctx, image, types.ImagePullOptions{})
if err != nil {
Expand Down