-
Notifications
You must be signed in to change notification settings - Fork 42
Pull fresh docker images before suite #1123
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
@@ -215,3 +223,31 @@ func InitializeIngestManagerTestSuite(ctx *godog.TestSuiteContext) { | |||
} | |||
}) | |||
} | |||
|
|||
func pullFreshImages(stackVersion, agentVersion, kibanaVersion string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wdyt about moving an abstraction of the PullFreshImages method to the internal docker package?
@@ -135,6 +138,11 @@ func InitializeIngestManagerTestSuite(ctx *godog.TestSuiteContext) { | |||
"stackVersion": common.StackVersion, | |||
} | |||
|
|||
if !shell.GetEnvBool("SKIP_PULL") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a section for Environment variables affecting the build
: https://github.com/elastic/e2e-testing/tree/master/e2e#environment-variables-affecting-the-build Can we add info about this new var there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like @mdelapenya idea of moving pullFreshImages
into internal/docker
, once that's done this PR should be good to go
@@ -436,3 +437,32 @@ func getDockerClient() *client.Client { | |||
|
|||
return instance | |||
} | |||
|
|||
// PullImages pulls images | |||
func PullImages(stackVersion, agentVersion, kibanaVersion string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One little one: because this method could be reused across different test suites, i.e. metricbeat, we could pass the images array as parameter.
Again, it's not a blocker and it could be done in a follow-up PR.
* Pull fresh docker images before suite * code review (cherry picked from commit 77eaee8)
* Pull fresh docker images before suite * code review (cherry picked from commit 77eaee8)
* master: chore: update mergify's titles (elastic#1142) chore: remove unused pipelines (elastic#1143) feat: use Docker copy to transfer binaries to containers (elastic#1136) chore: abstract image pulling (elastic#1137) Support multiple deployment backends (elastic#1130) chore: remove unused code (elastic#1119) Unify fleet and stand-alone suites (elastic#1112) Pull fresh docker images before suite (elastic#1123) chore: initialise timeout factor next to the declaration (elastic#1118) chore: match Go version with Beats (elastic#1120) feat: support running k8s autodiscover suite for Beats PRs and local repositories (elastic#1115) Auto bootstrap fleet during initialize scenario (elastic#1116) Kubernetes Deployment (elastic#1110)
What does this PR do?
Pull fresh Docker images before the suite runs, with the possibility to opt out. If Docker images are current, this takes a couple of seconds, which is marginal considering how long the whole suite takes (even just one scenario).
This makes sure that a test only uses the most recent images and not stale ones.
The clean-docker make target is still kept for convenience, although it probably can be removed in a follow up PR.