For the complete documentation index, see llms.txt. This page is also available as Markdown.

Google Cloud Functions Deploy

Create or update a Google Cloud Function from a manifest and artifact source.

The deploy step creates or updates a Google Cloud Function (Gen 2) using the service's manifest and artifact source. It captures the function's pre-deployment state as rollback data, and makes the function name, revision, and first-deployment flag available to later steps as output variables.


Deploy YAML

Minimal form:

- name: Google Cloud Function Deploy
  id: googleCloudFunctionDeployStep
  template:
    uses: googleCloudFunctionDeployStep

With explicit overrides:

- name: Google Cloud Function Deploy
  id: googleCloudFunctionDeployStep
  template:
    uses: googleCloudFunctionDeployStep
    with:
      skip_traffic: true
      command_timeout: 15m
      log_level: debug

How the deploy step works

When the step runs, Harness executes the following actions in order:

  1. Authenticates with Google Cloud using the connector configured on the infrastructure definition.

  2. Renders the Cloud Function manifest at Cloud Function Manifest Path and resolves the artifact source.

  3. Creates or updates the Google Cloud Function (Gen 2), which deploys the function as a backing Cloud Run service.

  4. Unless Skip Traffic is true, routes traffic to the new revision as part of the update.

  5. Saves the function name, revision, and first-deployment flag to step output, and saves the function's pre-deployment traffic state as rollback data for the rollback step.


Deploy fields

The following fields configure what the deploy step deploys and how it authenticates to Google Cloud.

Field
Default
Description

Cloud Function Manifest Path

${{runtime.manifestPath}}

Path to the rendered Cloud Function manifest file in the workspace. Auto-resolved from the service's manifest.

Artifact Source

—

The gs:// URL of the function source archive, for example gs://my-bucket/my-function-source.zip. Auto-resolved from the service's artifact source.

Update Field Mask

—

A comma-separated list of top-level fields to update on the Cloud Function resource, for example buildConfig,serviceConfig. Matches the Google Cloud API update mask parameter.

GCP Connector

—

The Google Cloud connector used to authenticate and deploy. Required.

GCP Region

${{infra.region}}

The Google Cloud region where the function deploys. Auto-resolved from the infrastructure definition.

GCP Project

${{infra.project}}

The Google Cloud project where the function deploys. Auto-resolved from the infrastructure definition.

Skip Traffic

false

When true, the deployed revision does not receive traffic until a separate traffic shift step runs.

Command Timeout

10m

Maximum time for the step to complete.

Log Level

info

Log verbosity for the step execution.

Advanced section

The step template also has a collapsible Advanced section for additional overrides not covered above.


Next steps

Last updated

Was this helpful?