Google Professional Cloud DevOps Engineer Question 69
Select 3Google Cloud PlatformYou are tasked with implementing a CI/CD pipeline for a microservices-based application deployed on Google Kubernetes Engine (GKE). The pipeline must ensure that code changes are automatically tested and deployed to the staging environment while keeping deployment to production gated for manual approval. Which combination of approaches should you include in your CI/CD pipeline design?
- A
Use Cloud Build to trigger builds and run automated unit and integration tests for every code commit.
- B
Configure a Cloud Build trigger that deploys changes directly to the production environment without any manual steps.
- C
Implement a staging environment on GKE and use a separate Cloud Build step to deploy to staging automatically after passing tests.
- D
Use Cloud Deploy to create a delivery pipeline with a manual approval step before deploying to the production environment.
- E
Leverage Google Cloud Pub/Sub to notify developers when the pipeline fails during automated testing.
Show answer and explanation
Correct answers: A, C, D
Explanation
The correct answers involve implementing a CI/CD pipeline that incorporates automated testing, deployment to a staging environment, and a manual approval step before production deployment. Cloud Build is used for building and testing, while Cloud Deploy facilitates the delivery pipeline with a manual gate for production deployment. Notifying developers about failures is a good practice but is not directly required to meet the pipeline's core requirements.
- A. Correct.
This is correct. Using Cloud Build to trigger builds and run automated tests ensures the CI/CD pipeline validates code changes early in the process.
- B. Incorrect.
This is incorrect. Deploying directly to production without manual approval contradicts the requirement to gate production deployment for manual approval.
- C. Correct.
This is correct. Automatically deploying to a staging environment after successful testing aligns with the requirement to test changes in a staging environment before production.
- D. Correct.
This is correct. Cloud Deploy supports manual approval steps, which fulfill the requirement for gated production deployment.
- E. Incorrect.
This is incorrect. While notifying developers about pipeline failures is useful, it does not directly contribute to implementing a CI/CD pipeline with the specified requirements.