
Answer-first summary for fast verification
Answer: Implement a .gcloud ignore file to exclude unnecessary files from the build process., Increase the CPU capacity of the virtual machine used for builds.
The correct approach involves using a .gcloud ignore file to exclude unneeded files, which can significantly reduce build time. Additionally, selecting a virtual machine with a higher CPU can also contribute to faster builds. Larger base images are counterproductive as they tend to slow down the build process, and adjusting Service Account permissions does not impact build speed. For more details, refer to the best practices for speeding up builds.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are tasked with optimizing the performance of an automated CI/CD pipeline that builds Docker images for deployment to Google Kubernetes Engine (GKE). Recently, you've noticed a decline in the build speed of Cloud Build within your pipeline. What strategies can you implement to enhance the build speed?
A
Increase the CPU capacity of the virtual machine used for builds.
B
Expand the permissions of the Cloud Build Service Account.
C
Implement a .gcloud ignore file to exclude unnecessary files from the build process.
D
Opt for larger base images to potentially speed up the build.
E
Use a .gitignore file to exclude files not required by your build.
No comments yet.