🔄 Building and Implementing CI/CD Pipelines - PCDOE Practice Questions

Build CI/CD with Cloud Build, Cloud Deploy, Artifact Registry, and deployment strategies.

10Questions Available
1Exam Domains

Practice CI/CD Pipelines Questions Now

Start a timed practice session focusing on Building and Implementing CI/CD Pipelines topics from the PCDOE question bank.

Start PCDOE Practice Quiz →

PCDOE CI/CD Pipelines Question Bank (10 Questions)

Browse all 10 practice questions covering Building and Implementing CI/CD Pipelines for the PCDOE certification exam. Each question includes the full answer and a detailed explanation to help you understand the concepts.

  1. Question 1Building and Implementing CI/CD Pipelines

    How do you set up a CI/CD pipeline using Cloud Build for a containerized application?

    ABuild manually and push
    Bcloudbuild.yaml: define steps (test → build → push to Artifact Registry → deploy to Cloud Run/GKE), trigger on Git push via Cloud Build triggers
    CUse cron jobs for deployment
    DDeploy directly from local machine
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Cloud Build CI/CD: 1) cloudbuild.yaml: multi-step pipeline. Steps: run tests, build Docker image, push to Artifact Registry, deploy. 2) Triggers: GitHub/Cloud Source Repositories (push to branch, tag, PR). 3) Substitutions: _PROJECT_ID, _REGION, custom variables. 4) Service account: Cloud Build SA with deploy permissions. 5) Artifacts: container images in Artifact Registry. 6) Deploy: gcloud run deploy, kubectl apply, or Terraform.

  2. Question 2Building and Implementing CI/CD Pipelines for a Service

    What is Cloud Deploy used for in the CI/CD pipeline?

    ASource code management
    BManaged continuous delivery to GKE and Cloud Run with approval gates and rollback
    CContainer image building
    DArtifact storage
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Cloud Deploy provides managed, opinionated CD with delivery pipelines, promotion between environments, approval requirements, automated rollback, and deployment verification.

  3. Question 3Building and Implementing CI/CD Pipelines

    How do you implement CI/CD for infrastructure changes using Terraform?

    ARun terraform apply locally
    BPR triggers terraform plan (review diff), merge triggers terraform apply, with remote state in Cloud Storage, state locking, and environment-specific workspaces
    CApply all changes at once
    DInfrastructure doesn't need CI/CD
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Terraform CI/CD: 1) PR: trigger terraform plan (show proposed changes). 2) Review: team reviews plan output in PR comments. 3) Merge: terraform apply (automated or with approval). 4) State: remote in Cloud Storage (gs://bucket/terraform.tfstate). 5) Locking: Cloud Storage + backend config (prevent concurrent applies). 6) Environments: workspaces or directory structure (dev/staging/prod). 7) Modules: reusable modules for common patterns. 8) Drift detection: scheduled plan to detect manual changes.

  4. Question 4Building and Implementing CI/CD Pipelines

    How do you securely manage secrets in CI/CD pipelines?

    AStore in environment variables in the CI config
    BSecret Manager for storage, Cloud Build service account permissions for access, never log secrets, rotate regularly, and use workload identity for runtime
    CEncrypt and commit to Git
    DUse the same secrets for all environments
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Secrets in CI/CD: 1) Storage: Secret Manager (versioned, access-controlled). 2) Access: Cloud Build SA → IAM → Secret Manager accessor. 3) In build: availableSecrets in cloudbuild.yaml (mounted as env vars). 4) Never: log secrets, hardcode, commit to Git. 5) Rotation: automated rotation schedule. 6) Environment: separate secrets per environment (dev/staging/prod). 7) Runtime: Workload Identity (GKE) → Secret Manager or Kubernetes Secrets (CSI driver). 8) Audit: Secret Manager access logs.

  5. Question 5Building and Implementing CI/CD Pipelines for a Service

    What is the difference between Cloud Build and Cloud Deploy?

    ASame service
    BCloud Build: CI/CD build execution (compile, test, create artifacts). Cloud Deploy: CD pipeline management (promotion through environments with approvals and rollback).
    CCloud Build is for deployment
    DCloud Deploy is for building
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Cloud Build: executes build steps (test, compile, containerize). Cloud Deploy: manages delivery pipeline stages (dev→staging→prod) with promotion, approval gates, canary/blue-green, and automated rollback. Build creates, Deploy delivers.

  6. Question 6Building and Implementing CI/CD Pipelines for a Service

    What is Cloud Deploy's delivery pipeline?

    AA data pipeline
    BA declarative configuration defining the stages (targets) a release must progress through, with promotion rules, approval requirements, and deployment strategies
    CA network pipeline
    DA monitoring pipeline
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Delivery pipeline: YAML defining: targets (dev, staging, prod), each mapped to GKE cluster or Cloud Run service. Release: immutable artifact rendered from Skaffold config. Promotion: advance release to next stage (manual or automated). Rollback: deploy previous release. Verification: post-deploy tests.

  7. Question 7Building and Implementing CI/CD Pipelines

    How do you implement a comprehensive testing strategy in a CI/CD pipeline?

    AOnly unit tests
    BTesting pyramid: unit tests (fast, many) → integration tests (medium) → e2e tests (slow, few), plus security scanning, load testing, and chaos testing before production
    CTest manually before deploy
    DTesting slows down delivery
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Testing in CI/CD: 1) Unit: fast, run on every commit (>80% coverage). 2) Integration: test service interactions (API contracts). 3) E2E: full user flows (Cypress, Selenium). 4) Security: SAST (source code), DAST (running app), dependency scanning. 5) Load: k6, Locust (performance regression detection). 6) Contract: consumer-driven contract testing (Pact). Pipeline: unit → lint → security scan → build → integration → e2e → deploy staging → load test → deploy prod.

  8. Question 8Building and Implementing CI/CD Pipelines

    How do you implement automated rollback in a CI/CD pipeline?

    AManual rollback only
    BMonitor SLIs post-deploy, automatically revert to previous version if error rate or latency exceeds thresholds, with Cloud Deploy rollback or Kubernetes rollout undo
    CRollback by redeploying previous code
    DFix forward instead of rolling back
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Automated rollback: 1) Canary analysis: compare canary vs baseline metrics. 2) Thresholds: error rate increase >0.5%, p99 latency increase >20%. 3) Cloud Deploy: rollback to previous release (one command). 4) GKE: kubectl rollout undo deployment/name. 5) Cloud Run: route traffic back to previous revision. 6) Time window: monitor for 15-30 min post-deploy before declaring success. 7) Fix forward: sometimes faster than rollback (if rollback is complex or risky). 8) Database: schema rollback is hardest (backward-compatible migrations).

  9. Question 9Building and Implementing CI/CD Pipelines for a Service

    What is the purpose of Artifact Registry in CI/CD?

    ASource code storage
    BStoring, scanning, and managing build artifacts (container images, language packages) produced by CI/CD pipelines
    CLog storage
    DConfiguration storage
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Artifact Registry stores CI/CD artifacts: Docker images from Cloud Build, npm/Maven/Python packages, with vulnerability scanning, IAM access control, and cleanup policies for lifecycle management.

  10. Question 10Building and Implementing CI/CD Pipelines

    What is Artifact Registry and its role in CI/CD?

    AA code repository
    BA universal package manager for Docker images, npm, Maven, Python, Go, and OS packages — providing vulnerability scanning, IAM-based access, and regional/multi-regional storage for CI/CD artifacts
    COnly for Docker
    DA backup service
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Artifact Registry: successor to Container Registry. Formats: Docker, Maven, npm, Python, Go, APT, YUM. Features: vulnerability scanning (on-push, continuous), IAM per repository, VPC-SC support, cleanup policies (auto-delete old versions), and remote repositories (proxy/cache for upstream registries). CI/CD integration: Cloud Build pushes images → Artifact Registry stores + scans → Cloud Deploy pulls for deployment. Pricing: storage + egress.

Key CI/CD Pipelines Concepts for PCDOE

cloud buildcloud deployci/cdartifact registrycanaryblue-greenpipeline

PCDOE CI/CD Pipelines Exam Tips

Building and Implementing CI/CD Pipelines questions in PCDOE are typically scenario-based. Focus on service-level decision making aligned to official exam objectives. Priority concepts: cloud build, cloud deploy, ci/cd, artifact registry, canary, blue-green.

What PCDOE Expects

  • Anchor your answer in select the most practical, secure, and scalable answer for the stated scenario.
  • CI/CD Pipelines scenarios for PCDOE are frequently mapped to Domain 2 (~20%), so read the objective carefully before picking controls or architecture.
  • Expect multi-service scenarios where CI/CD Pipelines interacts with IAM, networking, storage, or observability patterns rather than appearing as an isolated service question.
  • When two options are both technically valid, prefer the choice that best aligns with the exam's operational scope (Professional) and managed-service best practices.

High-Value CI/CD Pipelines Concepts

  • Know the core CI/CD Pipelines building blocks cold: cloud build, cloud deploy, ci/cd, artifact registry.
  • Review the edge-case features and limits for canary, blue-green; these details are commonly used to differentiate answer choices.
  • Practice service-integration reasoning: how CI/CD Pipelines pairs with SRE Principles, SRE Practice in real deployment patterns.
  • For PCDOE, explain why the chosen CI/CD Pipelines design meets reliability, security, and cost expectations better than the alternatives.

Common PCDOE Traps

  • Watch for answers that partially solve the requirement but miss operational constraints.
  • Questions in CI/CD Pipelines often include distractors that look correct for CI/CD Pipelines but violate least-privilege, durability, or availability requirements.
  • Avoid picking options purely by feature name; validate data path, failure handling, and governance impact before answering.
  • If the prompt hints at automation or repeatability, eliminate manual-only operational answers first.

Fast Review Checklist

  • Can you compare at least two CI/CD Pipelines implementation paths and justify which one best fits the scenario?
  • Can you map the chosen answer back to CI/CD Pipelines (~20%) outcomes for PCDOE?
  • Can you explain security and access boundaries for CI/CD Pipelines without relying on default-open assumptions?
  • Can you describe how CI/CD Pipelines integrates with SRE Principles and SRE Practice during failure, scaling, and monitoring events?

Exam Domains Covering CI/CD Pipelines

Related Resources

More PCDOE Study Resources