-
Notifications
You must be signed in to change notification settings - Fork 589
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
Docs refer to stale bazel-provided images, new images aren't compatible with Cloud Build #927
Comments
Oh man - I've been banging my head on this for |
Hey @t-hale - I forgot most of the details already, but IIRC #925 provided a gcr.io/cloud-builders/bazel:6.2.1 image which worked as expected. You can take a look at https://github.com/hulkholden/words/blob/main/cloudbuild.yaml to see the cloudbuild workflow that worked for me. |
A couple of the READMEs refer to
gcr.io/cloud-marketplace-containers/google/bazel
as alternative images provided by the bazel team, but it looks like this repo hasn't been updated since 2020.The bazel docs now point at
gcr.io/bazel-public/bazel
which does seem to be up-to-date.However, I was unable to get these images to work as a drop-in replacement with Cloud Build.
Small example:
Gives:
I think this is because the bazel Dockerfile is setting up an
ubuntu
user rather than running as root. Another consequence of this is that/workspace/
is not writeable which makes it painful to pass around outputs between build steps.One workaround for the cache issue is to pass
--output_user_root
like this:But that still doesn't resolve the
/workspace/
issues.So how should the cloud-builders READMEs be updated? I can send a PR to update the stale reference to gcr.io/bazel-public/bazel, but as the images are not drop-in replacements I think it would cause more confusion.
Maybe https://github.com/GoogleCloudPlatform/cloud-builders/blob/master/bazel/README.md can provide a bit more detail and the top-level README could point there?
Maybe there's a deeper compatibility issue which needs resolving? It is surprising that two Google-maintained bits of build infrastructure don't play nicely together.
The text was updated successfully, but these errors were encountered: