diff --git a/.cloudbuild/library_generation/cloudbuild-library-generation-push-prod.yaml b/.cloudbuild/library_generation/cloudbuild-library-generation-push-prod.yaml index b3d6783087..1499c9053b 100644 --- a/.cloudbuild/library_generation/cloudbuild-library-generation-push-prod.yaml +++ b/.cloudbuild/library_generation/cloudbuild-library-generation-push-prod.yaml @@ -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 diff --git a/.cloudbuild/library_generation/cloudbuild-library-generation-push.yaml b/.cloudbuild/library_generation/cloudbuild-library-generation-push.yaml index 012cd26817..359c021f69 100644 --- a/.cloudbuild/library_generation/cloudbuild-library-generation-push.yaml +++ b/.cloudbuild/library_generation/cloudbuild-library-generation-push.yaml @@ -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 diff --git a/hermetic_build/DEVELOPMENT.md b/hermetic_build/DEVELOPMENT.md index e54c57e9ec..4ba3d4b9af 100644 --- a/hermetic_build/DEVELOPMENT.md +++ b/hermetic_build/DEVELOPMENT.md @@ -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 diff --git a/hermetic_build/library_generation/tests/integration_tests.py b/hermetic_build/library_generation/tests/integration_tests.py index 5a1d5f7e53..a940069baa 100644 --- a/hermetic_build/library_generation/tests/integration_tests.py +++ b/hermetic_build/library_generation/tests/integration_tests.py @@ -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