
Explanation:
The correct approach involves configuring the Cloud Build config file with both an images field for Docker images to be pushed to the container registry and an artifacts field for non-container artifacts destined for Cloud Storage. This method is effective because:
cloudbuild.yaml or cloudbuild.json) is designed to define pipeline steps and configurations.images field is specifically for Docker images intended for a container registry.artifacts field is designated for non-container artifacts to be stored in Cloud Storage.Incorrect options involve misplacing these configurations in the source repository config file, which is meant for version control settings, not build configurations, or confusing the purposes of the images and artifacts fields.
Ultimate access to all questions.
No comments yet.
Your company has assigned you the task of setting up a Continuous Integration pipeline. This pipeline will automatically build Docker containers for pushing to Container Registry and non-container artifacts for Cloud Storage upon code commit to the source repository. How would you achieve this?
A
Include an images field in the Cloud Build config file to specify Docker images for the container registry.
B
Add an artifacts field to the source repository config file for non-container artifacts to be stored in Cloud Storage.
C
Insert an options field into the source repository config file to define non-container artifacts for Cloud Storage.
D
Use an artifacts field in the Cloud Build config file to specify non-container artifacts for Cloud Storage.
E
Place an images field in the source repository config file to indicate Docker images for the container registry.