🔥 40% Off Crucial Exams Memberships — Deal ends today!

1 hour, 59 minutes remaining!

GCP Professional Data Engineer Practice Question

Your team maintains a Java Dataflow Flex Template. Each push to the main branch must trigger Cloud Build that (1) runs Maven unit tests, (2) packages a shaded JAR, (3) builds and pushes a Docker image to Artifact Registry, and (4) creates the template specification file in a Cloud Storage bucket. All build steps must rely solely on Google-provided Cloud Builder images and follow least-privilege principles. Which cloudbuild.yaml outline satisfies these requirements?

  • steps:
    - name: gcr.io/cloud-builders/docker
      args: ["build","."]
    - name: gcr.io/cloud-builders/mvn
      args: ["-B","verify"]
    - name: gcr.io/google.com/cloudsdktool/cloud-sdk
      args: ["dataflow","flex-template","build","gs://$PROJECT_ID-templates/myjob.json"]
    images:
    - "gcr.io/$PROJECT_ID/myjob:latest"
    
  • steps:
    - name: gcr.io/$PROJECT_ID/custom/maven
      args: ["test","package"]
    - name: gcr.io/cloud-builders/docker
      args: ["build","-t","us-docker.pkg.dev/$PROJECT_ID/dataflow/myjob:latest","."]
    - name: gcr.io/google.com/cloudsdktool/cloud-sdk
      args: ["gsutil","cp","template.json","gs://$PROJECT_ID-templates/"]
    
  • steps:
    - id: test
      name: gcr.io/cloud-builders/mvn:3.8.5-jdk-11
      args: ["-B","clean","verify"]
    - id: package
      name: gcr.io/cloud-builders/mvn:3.8.5-jdk-11
      args: ["-B","package","-Pdataflow-runner","-DskipTests=false"]
      waitFor: ["test"]
    - id: build-image
      name: gcr.io/cloud-builders/docker
      args: ["build","-t","us-docker.pkg.dev/$PROJECT_ID/dataflow/myjob:$COMMIT_SHA","."]
      waitFor: ["package"]
    - id: push-image
      name: gcr.io/cloud-builders/docker
      args: ["push","us-docker.pkg.dev/$PROJECT_ID/dataflow/myjob:$COMMIT_SHA"]
      waitFor: ["build-image"]
    - id: flex-template
      name: gcr.io/google.com/cloudsdktool/cloud-sdk
      args:
        - "dataflow"
        - "flex-template"
        - "build"
        - "gs://$PROJECT_ID-templates/myjob.json"
        - "--image=us-docker.pkg.dev/$PROJECT_ID/dataflow/myjob:$COMMIT_SHA"
        - "--sdk-language=JAVA"
      waitFor: ["push-image"]
    images:
    - "us-docker.pkg.dev/$PROJECT_ID/dataflow/myjob:$COMMIT_SHA"
    
  • steps:
    - name: gcr.io/cloud-builders/mvn
      args: ["-B","package","-DskipTests"]
    - name: gcr.io/cloud-builders/docker
      args: ["build","-t","gcr.io/$PROJECT_ID/myjob:latest","."]
    - name: gcr.io/cloud-builders/docker
      args: ["push","gcr.io/$PROJECT_ID/myjob:latest"]
    
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