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: googleCloudFunctionDeployStepWith explicit overrides:
- name: Google Cloud Function Deploy
id: googleCloudFunctionDeployStep
template:
uses: googleCloudFunctionDeployStep
with:
skip_traffic: true
command_timeout: 15m
log_level: debugHow the deploy step works
When the step runs, Harness executes the following actions in order:
Authenticates with Google Cloud using the connector configured on the infrastructure definition.
Renders the Cloud Function manifest at Cloud Function Manifest Path and resolves the artifact source.
Creates or updates the Google Cloud Function (Gen 2), which deploys the function as a backing Cloud Run service.
Unless Skip Traffic is
true, routes traffic to the new revision as part of the update.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.
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.
Next steps
Go to Google Cloud Functions step library for the full list of available steps.
Go to Basic to use this step in a managed strategy.
Last updated
Was this helpful?