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.
Go deeper
Related to this question
Learn chapter
Introduction to Google Cloud Platform
Key term
Cloud Run
Cloud Run is a fully managed compute platform from Google Cloud that lets you run containerized applications in a serverless environment, automatically scaling from zero to thousands of requests.
Key term
Artifact Registry
Artifact Registry is a managed service for storing, managing, and securing container images and other software packages in a centralized repository.
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 →
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.