Prepare and test your skills
Prepare and test your skills
GitOps continuous integration and delivery with Git, Jenkins, and Argo CD is the practice of using Git as the single source of truth, an automation engine to build and test every change, and a delivery controller to reconcile environments to the declared state. On Google Cloud, Cloud Build (opens in a new tab) is the native automation core that imports source from GitHub, Bitbucket, or Artifact Registry and runs builds as containerized steps, while Jenkins is a supported third-party alternative available as a ready-to-go deployment on Google Cloud Marketplace. The software supply chain (opens in a new tab) in this model includes code and dependencies, approval processes, and the systems trusted to build, store, and run software.
Git branch events provide the shared repository signals that start continuous integration (CI). CI requires developers to merge code into a shared repository frequently, and test automation runs unit and integration tests on each commit to give rapid feedback and prevent regressions. A CI server works with a build tool such as Maven to run those tests as pipeline steps, and code that passes produces a passing build packaged as deployment artifacts. For Apache Beam Java workloads, the artifact is a self-executing JAR stored in a Cloud Storage bucket, while Classic Templates add a JSON template file and optional metadata, and continuous delivery copies verified artifacts to preproduction for end-to-end tests before production is updated.
Automation engines for building and testing changes execute the build configuration as isolated container steps and make every Git commit traceable. Cloud Build executes a cloudbuild.yaml file where each build step runs in a Docker container, started manually through the CLI or API or automatically through build triggers that fire on Git pushes matching branch or tag criteria. Jenkins replaces Cloud Build when teams must retain an existing Jenkins investment or custom builders, while Cloud Build fits teams that want ephemeral Google Cloud-hosted builders with native triggers and Artifact Registry integration. Both engines use build-time substitutions such as $COMMIT_SHA, $REPO_NAME, $BRANCH_NAME, $TAG_NAME, $REVISION_ID, $PROJECT_ID, and $BUILD_ID, and tagging images with $COMMIT_SHA links each image back to the exact commit for audit, rollback, and promotion.
The repository for this architecture typically holds workflow source, component sources and specifications for validation, transformation, training, evaluation, and serving, Dockerfiles, unit and integration tests, cloudbuild.yaml and trigger scripts, settings.yaml, and notebooks. Cloud Build runs an ordered workflow (opens in a new tab) against that repository:
/workspace directory in the build runtime.$COMMIT_SHA if tests pass.component.yaml file with the new image URL.pipeline.json.pipeline.json to Artifact Registry.wait() before promotion.Triggers can be skipped for documentation-only or notebook-only edits to avoid unnecessary builds.
Staged promotion toward GitOps reconciliation treats the Git-declared artifact as the desired state and advances only verified artifacts through defined targets. Cloud Deploy automates delivery to Google Kubernetes Engine (GKE), GKE Enterprise, and Cloud Run in a defined sequence with one-click approvals, rollbacks, enterprise audit, and delivery metrics. Argo CD complements this as a third-party GitOps controller that watches the Git desired state and reconciles the live cluster state toward it, so preproduction validation must succeed before production converges. For batch pipelines, continuous deployment can launch a new Dataflow job directly from artifacts, or schedulers such as Managed Service for Apache Airflow or Cloud Scheduler can launch jobs on demand.
Streaming pipelines are harder to automate because an existing streaming job may need replacement or in-place update with parallel-job coordination to avoid disruption. Define per-environment policies so only verified artifacts deploy to development, test, or production, and scan artifacts at creation to narrow security review and allow rollback to a known-safe version.
Provenance and policy checks for trusted delivery prove which system built an artifact and whether it is allowed to run. Cloud Build supports SLSA Level 3 builds for container images and generates authenticated, non-falsifiable provenance recording image digests, input source locations, toolchain, build steps, and duration. Artifact scanning and shift-left controls (opens in a new tab) check images on upload to Artifact Registry, monitor metadata for new vulnerabilities, update occurrences, generate a software bill of materials (SBOM), and accept Vulnerability Exploitability eXchange (VEX) statements. Binary Authorization (opens in a new tab) then enforces approval policy at deployment to GKE or Cloud Run by checking attestations that verify the build system, vulnerability policy compliance, and promotion from development to QA.
Exam tip: Biba protects integrity by blocking flow from lower to higher integrity, while Bell-LaPadula protects confidentiality by blocking flow from higher to lower confidentiality.
Security, identity, and secret integration within multi-cloud toolchains is the practice of giving third-party CI/CD tooling only the access it needs while proving its inputs, infrastructure, and outputs can be trusted. That trust combines least-privilege Identity and Access Management (IAM) identities, network perimeters, verified artifacts, and signed provenance from build to deployment. Pipelines use Secret Manager for secrets, Identity-Aware Proxy (IAP) for context-aware access control, and Workload Identity Federation to let external hybrid and multi-cloud identities act with short-lived Google Cloud credentials.
Least-privilege identities for pipeline access prevent the deployment pipeline from becoming a path for data exfiltration. Under the Bell-LaPadula confidentiality model (opens in a new tab), the pipeline must not consume inputs of higher confidentiality and must not write data to a resource of lower confidentiality. To apply it, teams categorize the data, applications, and resources the pipeline touches and assign the pipeline the highest confidentiality category among them, with a narrow exception when the pipeline can create but cannot read future-sensitive resources.
Many pipelines need no data access because they only manage configuration or software deployments. Over-granting is common when a pipeline receives project-level Cloud Storage access instead of a single bucket, or full access instead of create-only permission. Across hybrid topologies, teams use unique service accounts per environment and project, separate accounts for reading and writing artifacts, and separate accounts for Dataflow job management versus the worker service account that manages Compute Engine resources and Beam interaction. Production jobs specify a user-managed worker with the --serviceAccount option instead of the broad Compute Engine default service account, tightened further with IAM Conditions, principal access boundary policies, just-in-time elevation, and IAP policies by IP and device.
Integrity controls for third-party inputs and infrastructure prevent unauthorized modification, untrusted code deployment, and missing audit trails. Under the Biba integrity model, the pipeline must not consume inputs of lower integrity and must not write to resources of higher integrity, so the pipeline and its infrastructure must meet or exceed the highest integrity category of the resources they manage. The software supply chain (opens in a new tab) includes code and dependencies, people and approvals, and internal and external build and run systems.
Third-party inputs from Git, Jenkins, Argo CD, Packer, kpt, Terraform, kubectl, and Docker toolchains are a primary risk:
.rpm or .deb operating system packagesAttackers exploit those inputs by compromising artifact repositories, changing pipeline configuration to point to a different source, or uploading typosquatted packages with similar names. Pipelines reduce substitution risk by requiring signed artifacts, maintaining a curated list of trusted publisher certificates or public keys, verifying signatures with PGP for RPM and Maven and Authenticode for NuGet, or verifying hashes for infrequently changed unsigned artifacts. The underlying stack of CI/CD software, pipeline tools, operating system, and shielded VMs (opens in a new tab) must come from trusted sources, be rebuilt regularly from scratch, and apply static analysis, policy-as-code rules, and limits on simultaneous changes.
Exam tip: Use separate service accounts for creating and managing Dataflow jobs versus running them as workers, and do not use the Compute Engine default service account for production.
Network perimeters and scope limits contain a compromised pipeline or compromised deployment so it cannot reach new projects or exfiltrate data. A pipeline that can write to many storage and network locations gives an attacker more paths, so design revokes unneeded write access and blocks internet egress or restricts it to an allow-list, especially for pipelines handling confidential data or key material. VPC Service Controls restrict which resources and APIs are reachable from deployment projects, even when the attacker uses the pipeline to deploy compromised code that steals data from inside the environment. Cloud Workstations (opens in a new tab) adds managed development isolation with VPC controls, private ingress or egress, forced image updates, and IAM policies, while Cloud Build runs builds in isolated and ephemeral environments.
Scope limitation keeps one toolchain from damaging multiple projects. Pipelines receive access to individual resources instead of project-level grants, avoid access across multiple Google Cloud projects, and split into separately secured stages when they must span projects or environments. The pipeline and its infrastructure are treated like production systems with production access control, security, and availability, and Cloud Deploy then promotes through GKE, GKE Enterprise, and Cloud Run targets with approvals, rollbacks, and audit.
Continuous trust from provenance to deployment policy makes every artifact traceable from source through build to deployment. Cloud Build supports SLSA Level 3 builds and authenticated provenance recording digests, source locations, toolchain, steps, and duration, while dashboards consolidate source, build, artifact, deployment, runtime, and SBOM information. Artifact Registry (opens in a new tab) centralizes artifacts with remote repositories that cache Docker Hub, Maven Central, Python Package Index (PyPI), Debian, or CentOS sources and virtual repositories that consolidate same-format repositories behind one endpoint with search order favoring private packages to reduce dependency confusion. Artifact Analysis scans base images and language packages, generates SBOMs, and accepts VEX statements, while Assured Open Source Software supplies verified and continuously scanned packages.
Deployment-time policy ensures only verified work runs when third-party builders participate:
| Model | Protects | Pipeline must not |
|---|---|---|
| Bell-LaPadula | Confidentiality | Consume inputs of higher confidentiality, or write to resources of lower confidentiality |
| Biba | Integrity | Consume inputs of lower integrity, or write to resources of higher integrity |
Binary Authorization attaches attestations to images and checks them at deployment to GKE or Cloud Run to verify the build system, vulnerability policy, and promotion from development to QA or production. Together, SLSA maturity, provenance, scanning, and attestations enable automated releases, narrow reviews, rollback to safe versions, and per-environment policies so only verified artifacts deploy.
Declarative configuration and immutable image creation is the practice of defining infrastructure in versioned files and rebuilding images rather than patching running systems. Packer automates creation of secure, compliant golden machine images for Google Compute Engine, and kpt packages, customizes, and validates declarative Kubernetes resource configurations across GKE environments. Both integrate with Cloud Build, Artifact Registry, and Cloud Deploy for automated, repeatable promotion across development, test, and production.
Golden machine images for Google Compute Engine are virtual disks that already contain required software and configuration, also called golden disks or golden images. Image Import (opens in a new tab) brings existing disks from on-premises into Google Cloud and uses the resulting image to create virtual machines, supporting most virtual disk formats including VMDK and VHD. Packer extends that model by automating the build of new golden images from versioned templates so every rebuild is consistent and auditable.
Automated image pipelines rebuild on repository events. The repository contains a cloudbuild.yaml orchestration file, an imagebuilder.yaml recipe file, and referenced build scripts, connected through Cloud Build repositories (2nd gen) or Developer Connect links for GitHub, GitLab, or Bitbucket. Data flows from the Git push to Cloud Build, then to Compute Engine and Artifact Registry:
main after review or merge, starts the pipeline.This sequence enforces immutable infrastructure because a configuration change produces a new image instead of modifying a running VM.
Declarative Kubernetes configuration for GKE environments defines desired application and infrastructure state in files that can be versioned, reused, and shared. Infrastructure as Code (IaC) treats provisioning logic like application code by storing it in source control, applying it through CI/CD pipelines, and keeping history that can be audited and reverted. The same configuration can deploy reproducible development, test, and production environments from a single source of truth, and kpt packages those Kubernetes manifests, customizes them per environment, and validates them before they reach clusters.
Config Connector implements the pattern inside Kubernetes by managing Google Cloud resources as Kubernetes objects. Teams define Agent Platform resources such as datasets, models, and endpoints, plus Cloud SQL instances, Pub/Sub topics, and Cloud Storage buckets, with YAML manifests deployed to the GKE cluster to integrate application and infrastructure configuration. Templating handles environment differences, while IAM policies and service accounts are also implemented as IaC. Provisioning starts from modular templates: Cluster Toolkit (opens in a new tab) provides Google-curated Terraform blueprints that deploy ready-to-use high-performance computing, AI, and machine learning clusters in Slurm or GKE, customized in version control and applied through Cloud Build.
The build-to-promotion flow for immutable releases moves code and configuration from source control to running environments without manual steps. Cloud Build (opens in a new tab) imports source from Cloud Storage, Cloud Source Repositories, GitHub, or Bitbucket, executes the build to specification, and produces artifacts such as Docker containers or Java archives. Artifact Registry (opens in a new tab) provides a single location for packages and container images and integrates with CI/CD tools and runtimes to manage the full artifact lifecycle. Access spans two layers, where IAM permissions determine which users and service accounts can access repositories and access scopes further limit API access from a VM using application default credentials.
Cloud Deploy (opens in a new tab) automates delivery through a defined promotion sequence of target environments. Containerized applications deploy with Kubernetes and managed services such as GKE, while serverless targets use App Engine flexible environment, Cloud Run functions, and Cloud Run. Compliance controls for immutable releases include hardened compute images, Artifact Registry and Cloud Run image review, and verification of GKE Container Optimized OS.
Exam tip: Image Import brings an existing VMDK or VHD golden disk into Compute Engine, while a repository-triggered pipeline builds and publishes a new custom OS image after each push to main.
Tool choices for defining and deploying Infrastructure as Code separate authoring configuration from deploying it and governing change:
| Tool | Primary role | Choose when |
|---|---|---|
| Terraform | Define cloud and on-premises resources in human-readable configuration files | Versioned configuration and lifecycle management of Google Cloud infrastructure is needed |
| Infrastructure Manager (Infra Manager) | Automate deployment of Terraform configurations natively in Google Cloud | Programmatic deployment without maintaining a separate Terraform toolchain is needed |
| Terraform Cloud and Terraform Enterprise | Run Terraform remotely with stored state, secrets, version control system (VCS) integration, and API | Full organizational change management is needed, self-hosted for Terraform Enterprise |
Pipelines connect these tools through triggers on code commits, automated testing and validation such as Terraform validate and plan, storage of configurations as versioned artifacts, and separate dev, staging, and prod configurations with automated promotion. External build integrations, worker pools for Cloud Builds, and GKE auto repair with node-pool autoscaling keep build and runtime layers controlled and available.
$COMMIT_SHA links each image in Artifact Registry back to the exact commit that produced it for audit, rollback, and promotion.Jenkins is the supported third-party alternative when teams must retain an existing Jenkins investment or custom builders, while Cloud Build is the native automation core for teams that want ephemeral Google Cloud-hosted builders with native triggers and Artifact Registry integration. Jenkins is available as a ready-to-go deployment on Google Cloud Marketplace, and Cloud Build imports source from GitHub, Bitbucket, or Artifact Registry and runs builds as containerized steps.
Cloud Deploy automates delivery to Google Kubernetes Engine, GKE Enterprise, and Cloud Run in a defined sequence with one-click approvals, rollbacks, enterprise audit, and delivery metrics, while Argo CD watches the Git desired state and reconciles the live cluster state toward it. Preproduction validation must succeed before production converges, so only verified artifacts advance through defined targets.
Bell-LaPadula protects confidentiality by blocking flow from higher to lower confidentiality, while Biba protects integrity by blocking flow from lower to higher integrity. For pipelines this means Bell-LaPadula forbids consuming inputs of higher confidentiality or writing to resources of lower confidentiality, and Biba forbids consuming inputs of lower integrity or writing to resources of higher integrity.
An enterprise DevOps team is architecting a multi-cloud continuous deployment pipeline using Argo CD hosted on an external Kubernetes cluster. The pipeline needs to deploy application artifacts and fetch sensitive database credentials directly from Google Cloud Secret Manager across projects.
Corporate security policy strictly prohibits the creation, distribution, and storage of downloadable long-lived service account keys (.json key files) within external CI/CD systems.
Which solution should the team implement to authenticate the external pipeline to Google Cloud while maintaining least-privilege access control?
Last updated