Courseiva

Google PCA Practice Question: Managing and Provisioning a Solution Infrastructure

A company wants to implement a CI/CD pipeline for a Java application that will be deployed to Cloud Run. They use Cloud Build and Artifact Registry. The pipeline must compile the Java code, run unit tests, build a container image, and deploy to Cloud Run. Which THREE steps are required in the cloudbuild.yaml? (Choose 3)

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Step with image 'docker' and args: ['build', '-t', '...']

To compile Java, use a Maven or Gradle step. Build the image using docker build. Deploy to Cloud Run using gcloud run deploy.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Step with image 'gcloud' and entrypoint: 'gcloud', args: ['container', 'clusters', 'get-credentials']

    Why it's wrong here

    This is for GKE, not Cloud Run.

  • Step with image 'docker' and args: ['build', '-t', '...']

    Why this is correct

    This builds the container image.

  • Step with image 'maven' and args: ['mvn', 'compile', 'test']

    Why this is correct

    This compiles code and runs tests.

  • Step with image 'node' and entrypoint: 'npm', args: ['test']

    Why it's wrong here

    Node is not needed for a Java application.

  • Step with image 'gcloud' and entrypoint: 'gcloud', args: ['run', 'deploy', ...]

    Why this is correct

    This deploys to Cloud Run.

About these practice questions

This PCA question is part of Courseiva's 955-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PCA practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCA exam.