GCP Professional Data Engineer Practice Question

Your data engineering team stores Apache Beam code in Cloud Source Repositories and deploys the pipelines as Dataflow Flex Templates. You need a CI/CD workflow that satisfies these constraints:

  • A push to any feature branch must run unit tests but must not publish a template.
  • A merge to the main branch must build a container image, generate the Flex Template JSON spec, and upload the spec to a version‐stamped folder in a Cloud Storage bucket in the dev project.
  • Tagging a commit with the prefix prod- must promote exactly the same template artifact from the dev bucket to the production bucket without rebuilding the image or template.

Which Cloud Build design will meet all of the requirements while keeping artifacts immutable between environments?

  • Define three Cloud Build triggers (feature, main, prod) that all invoke the same cloudbuild.yaml. Each trigger always rebuilds the container image and template, but the prod trigger includes a manual approval step before the rebuild executes.

  • Create a single Cloud Build trigger that fires on every branch. Use conditional logic inside cloudbuild.yaml to decide whether to publish to the dev or prod bucket, rebuilding the container image and template each time.

  • Create one tag trigger that fires on tags beginning with prod-, rebuilds the container image and template, and uploads the artifacts to both the dev and prod buckets; run unit tests for feature branches using GitHub Actions outside Cloud Build.

  • Define two Cloud Build triggers:

    • A branch trigger matching ^main$ that builds the container image, generates the Flex Template spec, and uploads the spec to a commit-SHA folder in the dev bucket.
    • A tag trigger matching ^prod-.*$ that retrieves the previously generated spec from the dev bucket and copies it unchanged to the prod bucket, without running any build steps that re-create the image or template.
GCP Professional Data Engineer
Ingesting and processing the data
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot