Skip to content
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

fix: use BuildKit instead of legacy builder to build the Hermetic Build images #3338

Merged
merged 7 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ steps:
"--file", ".cloudbuild/library_generation/library_generation.Dockerfile", "."]
id: library-generation-build
waitFor: ["-"]
env:
- 'DOCKER_BUILDKIT=1'

options:
logging: CLOUD_LOGGING_ONLY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ steps:
"--file", ".cloudbuild/library_generation/library_generation.Dockerfile", "."]
id: library-generation-build
waitFor: ["-"]
env:
- 'DOCKER_BUILDKIT=1'

options:
logging: CLOUD_LOGGING_ONLY
Expand Down
3 changes: 0 additions & 3 deletions hermetic_build/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,6 @@ python hermetic_build/library_generation/cli/entry_point.py generate \
```
Please note that the build only works when using the new
[Docker BuildKit](https://docs.docker.com/build/buildkit/) (enabled through the `DOCKER_BUILDKIT` variable).
This is meant for local development only (in CloudTops) - GH Actions' Ubuntu-22.04 \
[comes with the latest Docker version](https://github.com/actions/runner-images/blob/e74605cd6d5407469cf224802f25057bafc23d70/images/ubuntu/Ubuntu2204-Readme.md?plain=1#L81-L83)
and is able to handle the build properly using the (updated) legacy builder.

3. Set the version of gapic-generator-java

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ def __build_image(cls, docker_file: str, cwd: str):
subprocess.check_call(
["docker", "build", "-f", docker_file, "-t", image_tag, "."],
cwd=cwd,
env=dict(os.environ, DOCKER_BUILDKIT="1")
)

@classmethod
Expand Down
Loading