-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🏃 speed up e2e image builds #2660
🏃 speed up e2e image builds #2660
Conversation
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.
minor question related to one of the .dockerignore directives, otherwise lgtm
@@ -11,4 +11,7 @@ scripts/ | |||
tilt-settings.json | |||
tilt.d/ | |||
Tiltfile | |||
**/.tiltbuild | |||
test/infrastructure/docker/e2e/logs/** | |||
**/config/**/*.yaml |
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 wouldn't think we need anything under the config directory, or is this to prevent accidental inclusion of other directories that might be named config
?
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.
Hmm, maybe deserves a comment – the trouble is that setting the image pull strategy + arch modifies files under each manager's config
directory.
So, when we do the next COPY . .
it's a different tree, and the go build .
runs again, once per manager.
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.
Yeah, the point I was attempting to make is that I don't think we need the config directory at all in the docker images, since it only contains generated yaml and not code to be compiled/run in the container.
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.
Exactly – it's not needed by any of the images, but it does bust the cache on each image build. Seemed like a worthy .dockerignore
entry :)
/test pull-cluster-api-verify |
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.
this looks great!
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chuckha, sethp-nr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
What this PR does / why we need it:
Reduced repeat work on image builds, and shrinks the docker context that gets sent over the wire.