Skip to content

Support parallel building of Docker images #52920

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

Merged
merged 2 commits into from
Feb 28, 2020

Conversation

mark-vieira
Copy link
Contributor

We currently build two variants of our Docker image: oss and default. Because these tasks both belong to the same Gradle subproject :distribution:docker they cannot be run concurrently by default. Rather than introducing more subprojects just for the purposes of parallel build execution, this PR adds a DockerBuildTask which leverages the Gradle Worker API which allows intra-project task parallelism.

This should considerably help out builds that spend the majority of their time on building these images. In the example below you can see the task execution timeline is very sparse toward the end of the build due mainly to the fact that Docker image construction is done serially.

image

@mark-vieira mark-vieira added >non-issue :Delivery/Build Build or test infrastructure labels Feb 27, 2020
@mark-vieira mark-vieira requested a review from rjernst February 27, 2020 20:28
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Build)

@mark-vieira
Copy link
Contributor Author

@elasticmachine update branch

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mark-vieira mark-vieira merged commit 007ec1f into elastic:master Feb 28, 2020
@mark-vieira mark-vieira deleted the parallel-docker-builds branch February 28, 2020 03:18
@ywelsch ywelsch added v7.6.1 and removed v7.6.2 labels Mar 2, 2020
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure >non-issue Team:Delivery Meta label for Delivery team v7.6.1 v7.7.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants