xref: /aosp_15_r20/external/google-cloud-java/owl-bot-postprocessor/README.md (revision 55e87721aa1bc457b326496a7ca40f3ea1a63287)
1*55e87721SMatt Gilbride# Docker container for Owl Bot Postprocessor
2*55e87721SMatt Gilbride
3*55e87721SMatt GilbrideThis container runs when Owl Bot Postprocessor runs on this google-cloud-java
4*55e87721SMatt Gilbridemonorepo. The Cloud Build in the repo-automation-bots GCP project publishes
5*55e87721SMatt Gilbride`gcr.io/cloud-devrel-public-resources/owlbot-java-monorepo` image.
6*55e87721SMatt Gilbride
7*55e87721SMatt GilbrideNote that the split repositories (such as [googleapis/java-bigquery](
8*55e87721SMatt Gilbridehttps://github.com/googleapis/java-bigquery)) continue to use the
9*55e87721SMatt Gilbride`gcr.io/cloud-devrel-public-resources/owlbot-java` image, maintained in
10*55e87721SMatt Gilbride[googleapis/synthtool](
11*55e87721SMatt Gilbridehttps://github.com/googleapis/synthtool/tree/master/docker/owlbot/java)
12*55e87721SMatt Gilbriderepository.
13*55e87721SMatt Gilbride
14*55e87721SMatt GilbrideThis separation allows us to focus on monorepo-specific postprocessor logic in
15*55e87721SMatt Gilbridethis `owlbot-java-monorepo` image, without interfering the split repositories.
16*55e87721SMatt Gilbride
17*55e87721SMatt Gilbride# Principles
18*55e87721SMatt Gilbride
19*55e87721SMatt Gilbride## Thin Container
20*55e87721SMatt GilbrideThis docker container is "thin", meaning that we do not install the
21*55e87721SMatt Gilbridepostprocessor logic into the container. Rather, the container executes scripts
22*55e87721SMatt Gilbridethat live in the repository.
23*55e87721SMatt Gilbride
24*55e87721SMatt GilbrideThis design allows us the template logic changes and affected file changes
25*55e87721SMatt Gilbridewithin one pull request. No need to rebuild the postprocessor image.
26*55e87721SMatt Gilbride
27*55e87721SMatt Gilbride## Secure by Cloud Build
28*55e87721SMatt Gilbride
29*55e87721SMatt GilbrideExecuting the scripts within the container in Owl Bot's Cloud Build environment
30*55e87721SMatt Gilbrideensures the secure runtime that only allows access to the repository
31*55e87721SMatt Gilbride(no access to credentials).
32*55e87721SMatt Gilbride
33*55e87721SMatt Gilbride# How to Build
34*55e87721SMatt Gilbride
35*55e87721SMatt GilbrideYou can build the container locally:
36*55e87721SMatt Gilbride
37*55e87721SMatt Gilbride```
38*55e87721SMatt Gilbride~/google-cloud-java$ docker build -f owl-bot-postprocessor/Dockerfile owl-bot-postprocessor
39*55e87721SMatt Gilbride```
40