diff --git a/e2e/_suites/fleet/ingest_manager_test.go b/e2e/_suites/fleet/ingest_manager_test.go index f6911ae8fe..8842f4749b 100644 --- a/e2e/_suites/fleet/ingest_manager_test.go +++ b/e2e/_suites/fleet/ingest_manager_test.go @@ -123,8 +123,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" diff --git a/internal/docker/docker.go b/internal/docker/docker.go index 05df4b0c16..f99c550ce4 100644 --- a/internal/docker/docker.go +++ b/internal/docker/docker.go @@ -439,21 +439,12 @@ 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 {