QuestionQ311

Integrating applications with Google Cloud services

Your team is building a new application that is packaged as a container and stored in Artifact Registry. You are responsible for setting up the Cloud Build CI/CD pipelines. Containers can be pushed manually for local development or during an emergency. Each time a new container is pushed to Artifact Registry, you must trigger another Cloud Build pipeline to perform a vulnerability scan. You want to implement this requirement with the least effort. What should you do?

  • A Configure Artifact Registry to publish a message to a Pub/Sub topic when a new image is pushed. Configure the vulnerability scan pipeline to be triggered by the Pub/Sub message.
  • B Configure the Cloud Build Cl pipeline that publishes the new image to send a message to a Pub/Sub topic that triggers the vulnerability scan pipeline.
  • C Configure Artifact Registry to publish a message to a Pub/Sub topic when a new image is pushed. Configure Pub/Sub to invoke a Cloud Function that triggers the vulnerability scan pipeline.
  • D Use Cloud Scheduler to periodically check for new versions of the container in Artifact Registry and trigger the vulnerability scan pipeline.
Explanation

Artifact Registry can publish Pub/Sub notifications for repository changes, including container image uploads and new tags. A Cloud Build Pub/Sub trigger can directly start a build from those messages, so it also covers images pushed manually or during emergencies without adding a Cloud Function or polling process.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!