Troubleshooting CI/CD Pipeline with Cloud Build and Docker Hub | PCDE Exam Preparation

Resolving Issues with Cloud Build YAML Configuration | PCDE Exam Preparation

Question

You have a CI/CD pipeline that uses Cloud Build to build new Docker images and push them to Docker Hub.

You use Git for code versioning.

After making a change in the Cloud Build YAML configuration, you notice that no new artifacts are being built by the pipeline.

You need to resolve the issue following Site Reliability Engineering practices.

What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B.

Option A, disabling the CI pipeline and reverting to manual builds, is not a recommended solution since it defeats the purpose of having a CI/CD pipeline in the first place. This approach also goes against the principles of Site Reliability Engineering (SRE), which emphasizes automation and continuous improvement.

Option B, changing the CI pipeline to push artifacts to Container Registry instead of Docker Hub, may not address the underlying issue with the Cloud Build YAML configuration. While it's possible that this change could work, it's more of a workaround rather than a solution to the problem.

Option C, uploading the configuration YAML file to Cloud Storage and using Error Reporting to identify and fix the issue, is a good approach to follow SRE practices. Uploading the configuration YAML file to Cloud Storage ensures that the file is backed up and can be easily accessed by other team members if needed. By using Error Reporting, you can monitor the CI/CD pipeline for errors and receive notifications when an issue occurs. You can then use the error reports to diagnose and fix the issue.

Option D, running a Git compare between the previous and current Cloud Build Configuration files to find and fix the bug, is a good approach to troubleshooting the problem. By comparing the previous and current configuration files, you can identify what changes were made and potentially find the cause of the issue. However, this approach may be time-consuming, especially if the configuration files are large and complex.

In conclusion, the best option is likely C, uploading the configuration YAML file to Cloud Storage and using Error Reporting to identify and fix the issue. This approach aligns with Site Reliability Engineering practices and allows for efficient troubleshooting of the problem.