Building and testing applications
Practise only this domain. 31 questions with explanations, 20 at a time.
Start this domainSample questions
- Your Cloud Build pipeline must produce the same output when rerun a year from now, and auditors need to know exactly which compiler image each build used. How should the build steps reference that image?Hard
- Your Cloud Build config produces an image for an Artifact Registry repository. The release team wants each build pushed with an immutable commit-SHA tag and also with a moving tag that always points at the newest build. How should the images section be written?Easy
- Your release team needs every container image built by Cloud Build to carry a verifiable record of its source commit, the builder used, and the build steps, so a later admission policy can check where the image came from. What should the build configuration enable?Hard
- A cloudbuild.yaml file has three steps in this order: build the image, push the image, then run unit tests. The tests sometimes fail, but by then the image has already been pushed. How should the pipeline be changed?Easy
- A container build for a Go API needs a full compiler toolchain and downloaded modules, but the running service only executes one compiled binary. Which Dockerfile approach keeps the deployed image small?Easy