Prepare and test your skills
Prepare and test your skills
Designing automated CI/CD pipelines and artifact management means standardizing how code moves from source to production so only secure, versioned artifacts are deployed. Source code flows into Cloud Build (opens in a new tab) for compilation and testing, built images flow from Cloud Build into Artifact Registry (opens in a new tab) for storage, and releases flow from Artifact Registry through Cloud Deploy (opens in a new tab) to target environments in order. This chain removes manual errors, gives consistent feedback, and makes rollback to a known safe version possible.
Standardized builds with Cloud Build run compilation and testing on Google Cloud infrastructure in a repeatable way. Source code flows from the repository to Cloud Build, and finished container images flow from Cloud Build to Artifact Registry. Each build runs in an isolated and ephemeral environment with granular Identity and Access Management (IAM) permissions and VPC Service Controls, so every build starts clean and has only the access it needs.
Cloud Build also produces supply-chain evidence (opens in a new tab) for container images, including support for Supply-chain Levels for Software Artifacts (SLSA) Level 3 builds and authenticated, non-falsifiable build provenance. Build provenance is verifiable metadata about a build, including image digests, input source locations, toolchain, build steps, and build duration. Security insights (opens in a new tab) for built applications bring this evidence together:
Centralized artifact management with Artifact Registry gives teams one universal package manager for build artifacts and dependencies. Artifacts flow from Cloud Build and external sources into Artifact Registry, and deployments pull versioned artifacts from Artifact Registry. Central storage supports versioning, access control, VPC Service Controls service perimeters, and organizational policies, so teams can see and control the code in the software supply chain.
Artifact Registry uses different repository types to handle internal and external packages:
| Repository type | What it holds | How it helps the pipeline |
|---|---|---|
| Remote repositories | Cached artifacts from preset external sources such as Docker Hub, Maven Central, Python Package Index (PyPI), Debian or CentOS, plus user-defined sources for supported formats | Caching reduces download time, improves package availability, and includes vulnerability scanning if scanning is enabled |
| Virtual repositories | Consolidated repositories of the same format behind a single endpoint with a controlled search order across upstream repositories | Prioritizing private packages in the search order reduces the risk of dependency confusion attacks |
Exam tip: Remote repositories cache external packages for faster and more available builds, while virtual repositories consolidate same-format repositories behind one endpoint and prioritize private packages.
Automated delivery and secure promotion with Cloud Deploy moves release artifacts through development, test, and production in a defined sequence. Release artifacts flow from Artifact Registry to Cloud Deploy, and Cloud Deploy promotes them in order to Google Kubernetes Engine (GKE), GKE Enterprise, and Cloud Run. Cloud Deploy provides one-click approvals and rollbacks, enterprise security and audit, built-in delivery metrics, and security insights for deployed applications.
Promotion is gated so only verified artifacts advance, and Binary Authorization enforces that gate with configurable signatures called attestations. At deployment time on GKE or Cloud Run, Binary Authorization checks attestations to decide whether required processes were completed:
Because deployment depends on valid attestations, only trusted code runs on the target platform, and teams can define different policies for development, test, and production.
Continuous vulnerability management for stored artifacts proactively detects problems in Artifact Registry. Artifact Analysis provides on-demand or automated scanning for base container images and language packages in containers, plus generation of a software bill of materials (SBOM) and upload of Vulnerability Exploitability eXchange (VEX) statements. Scanning automatically when artifacts are created narrows security reviews and helps teams find and fix bugs early, fast, and reliably.
Vulnerability handling for container images follows an ordered lifecycle after an image arrives in Artifact Registry:
Implementing release orchestration and rollback procedures means delivering tested artifacts through a defined sequence of environments with controlled promotion and fast recovery. Google Cloud Deploy (opens in a new tab) automates delivery to a series of target environments in a defined promotion sequence. The same orchestration process applies to promotions, rollbacks, and redeployments, so recovery uses the same pipeline, approvals, and controls as forward releases.
Release orchestration with Google Cloud Deploy moves each release from one target environment to the next, such as development to staging to production. A delivery pipeline defines the promotion sequence and its targets, and each release moves through that sequence in order. Containerized workloads typically deploy to Google Kubernetes Engine (GKE) (opens in a new tab) and Kubernetes, while other runtimes include Cloud Run and App Engine flexible environment. Choose Google Cloud Deploy when releases must follow a consistent, auditable promotion path instead of manual deployment to each environment.
The build-to-deploy chain connects three services in order, where source flows into builds, builds flow into a registry, and the registry flows through deployment to targets:
A left-to-right flow showing source code built by Cloud Build, stored in Artifact Registry, then promoted by Cloud Deploy through Dev, Staging, and Prod in order.
Promotion, rollback, and redeployment controls in Google Cloud Deploy share the same operational process. A rollout to the next environment may pause and require approval before it continues, and flow control for that decision is enforced through Identity and Access Management (IAM). Because a rollback is a promotion of a prior stable release through the same pipeline, teams do not need a separate emergency path. This consistency keeps permissions, approvals, and audit history intact during incidents.
Global resources need stricter promotion policy because they can become single points of failure. Virtual Private Cloud (VPC) networks and global load balancers are resilient to zone and region outages, but a single misconfigured forwarding rule can stop the frontend from receiving or processing user requests even while the backend is intact. First verify changes to global resources before production, then classify modifications to global resources as high-risk changes that additional reviewers must verify and approve.
Automation and release notifications in Google Cloud Deploy perform pipeline operations at their designated time and inform external systems. An operator defines an automation with automation rules, and an automationRun resource represents each execution of an automation rule. The automation depends on the delivery pipeline for its targets and sequence, and the pipeline depends on IAM to permit the automated operation.
Notifications flow from Google Cloud Deploy to Pub/Sub topics and then to subscribed external systems for approval workflows and integrations. The service publishes notifications to several Pub/Sub topics when key events occur, for example when a rollout requires approval. Throughout operation the service also writes platform logs and audit logs to Google Cloud Observability (opens in a new tab) and Cloud Audit Logs, so every promotion, rollback, automation, and approval leaves an observable trail.
Progressive delivery is the practice of changing only a small portion of production first, verifying the effect, and then expanding the change. If issues appear, the infrastructure or application is reverted quickly to the previous stable state, issues are diagnosed and resolved, and the progressive process restarts. This approach limits blast radius and maintains system stability during production deployments.
A progressive infrastructure and release change follows an ordered sequence:
Exam tip: A rollback in Google Cloud Deploy uses the same pipeline process as a promotion, while a progressive change requires reverting to the previous stable state before retrying.
Monitoring availability and separating application failures combines pipeline observability with infrastructure health signals. Pipeline signals flow from Google Cloud Deploy to Google Cloud Observability, Cloud Audit Logs, and Pub/Sub topics, while infrastructure signals come from Service Health. The Google Cloud Service Health Dashboard shows current status of services across all regions, and its history page details each incident by duration, affected zones and regions, affected services, and workarounds. Personalized Service Health shows incidents relevant to a specific project, supports API access per project or per organization, supports alerts, and supports RSS feeds.
An unavailable application does not always mean a Google Cloud outage. A software update can crash application servers, or an administrator can delete load balancer forwarding rules, leaving the application unavailable with no infrastructure incident. During a failed release, first check Service Health for platform incidents, then check pipeline logs, audit logs, and application configuration to decide between rollback and forward fix.
Evaluating deployment strategies and risk mitigation means selecting a repeatable release path for each workload and adding controls that keep releases reliable and secure. In this scope, the Looker API (opens in a new tab) promotes LookML code to production, Google Kubernetes Engine (GKE) runs a containerized Pub/Sub subscriber, Cloud Run runs event-driven functions with Eventarc triggers, and Cloud Monitoring provides dashboards and alerting policies that detect problems after release.
Deploying a LookML project to production with the Looker API moves the head of a branch, a commit SHA, or a tag to the production environment. The API endpoint is <HOST_URL>/api/4.0/projects/<PROJECT_ID>/deploy_ref_to_production with either ?branch=<BRANCH_NAME> for the head of a branch or ?ref=<SHA_OR_TAG> for a specific commit or tag. The Looker software development kits (SDKs) provide the same capability through the deploy_ref_to_production method and handle authentication, parameter serialization, and response serialization.
| Deployment target | API request parameter | SDK call |
|---|---|---|
| Head of a branch | ?branch=<BRANCH_NAME> | deploy_ref_to_production(<PROJECT_ID>, {branch: <BRANCH_NAME>}) |
| Commit SHA or tag | ?ref=<SHA_OR_TAG> | deploy_ref_to_production(<PROJECT_ID>, {ref: <SHA_OR_TAG>}) |
The SDK call depends on the same project identifier and target reference as the API request, with angle-bracket values replaced by the specific project, branch, SHA, or tag. Choose the branch form when the goal is to release the latest commit on a branch, and choose the ref form when the goal is to release a pinned commit SHA or tag for repeatability.
Exam tip: Use branch=<BRANCH_NAME> to deploy the head of a branch and ref=<SHA_OR_TAG> to deploy a specific commit SHA or tag.
Running containerized workloads on GKE uses a Kubernetes Deployment to declare the desired container state. The Deployment named pubsub uses selector.matchLabels with app: pubsub to select pods created from a pod template that carries the same app: pubsub label. The pod template runs one container named subscriber from the image us-docker.pkg.dev/google-samples/containers/gke/pubsub-sample:v2.
The selector creates a binding between the Deployment and its pods, so only pods with the matching label are managed as part of the pubsub Deployment. The container image defines the exact code that runs in every managed pod, which keeps releases consistent across replicas. Changing the image tag in the Deployment template is how a new version of the subscriber is introduced.
Deploying event-driven functions on Cloud Run packages source code with a language base image and connects the resulting service to Pub/Sub through an Eventarc trigger. The deployment command is gcloud run deploy FUNCTION --source . --function <ENTRY_POINT> --base-image BASE_IMAGE, where FUNCTION is the Cloud Run service name and BASE_IMAGE is the runtime environment. Documented base-image and entry-point pairs include:
python314 with subscribe or hello_pubsubgo127 with HelloPubSubjava25 with functions.SubscribeToTopicdotnet10 with HelloPubSub.Functionruby40 with hello_pubsubphp85 with helloworldPubsubAfter deployment, an Eventarc trigger routes Pub/Sub events to the Cloud Run service. Traffic flows from the Pub/Sub topic to the destination Cloud Run service when an event of type google.cloud.pubsub.topic.v1.messagePublished occurs. The trigger is created with gcloud eventarc triggers create TRIGGER_NAME and depends on the destination service name, destination region, location, and the service account PROJECT_NUMBER-compute@developer.gserviceaccount.com. When Eventarc is used for the first time in a project, provisioning of the Eventarc service agent can cause a delay.
Reducing release risk with monitoring and alerting uses Cloud Monitoring dashboards and alerting policies to observe behavior after a release. The Cloud Monitoring Integrations page lists third-party integrations such as Varnish, and the Compute Engine deployment-platform filter locates the Varnish entry. The Dashboards tab shows a static preview, and View dashboard opens the installed dashboard for live inspection.
Alerting policies in Cloud Monitoring notify operators when specified conditions occur and require notification channels to deliver those notifications. A policy without notification channels still fires, but it fires silently and its status is visible only in Monitoring. Installing the Varnish alerting policies follows an ordered workflow:
The alerting policy depends on the selected notification channels to deliver its notification to people and systems outside Monitoring. Together, dashboards for visual verification and alerting policies for automatic notification provide the feedback loop that confirms a deployment stayed healthy or signals that intervention is needed.
In Artifact Registry, remote repositories cache artifacts from external sources while virtual repositories consolidate same-format repositories behind a single endpoint. Caching from sources such as Docker Hub, Maven Central, Python Package Index (PyPI), Debian or CentOS reduces download time and improves availability with vulnerability scanning if scanning is enabled, while prioritizing private packages in the virtual repository search order reduces the risk of dependency confusion attacks.
Binary Authorization gates deployment on Google Kubernetes Engine (GKE) and Cloud Run by checking attestations at deployment time. The attestations prove that a specific build system created the image, that the image complies with a vulnerability signing policy, and that it passes criteria for promotion to the next environment, so only trusted code runs and different policies can be defined for development, test, and production.
A rollback in Google Cloud Deploy is a promotion of a prior stable release through the same delivery pipeline, approvals, and Identity and Access Management (IAM) controls as a forward release. This consistency keeps permissions, approvals, and audit history intact during incidents and avoids needing a separate emergency path.
Artifact Analysis handles vulnerabilities for stored container images through initial scan on upload, continuous monitoring, and metadata updates. It scans a new image on upload and extracts information about system packages, then continuously monitors metadata of scanned images for new vulnerabilities as information arrives from vulnerability sources, updates metadata to stay current, creates new vulnerability occurrences for new findings, and deletes occurrences that are no longer valid.
An enterprise organization is designing an automated CI/CD pipeline in Google Cloud to build and manage container images across staging and production environments. The cloud architecture and security teams have established the following requirements:
Which solution should the cloud architect implement?
Last updated