For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Basic deployment

Deploy a new Google Cloud Function revision and route full traffic to it immediately.

Basic deployment deploys a new function revision and routes all traffic to it immediately, with no intermediate traffic shifting. Use this strategy when you do not need a progressive or zero-downtime cutover.


What you will learn from this topic

  • Understand how Harness deploys a new function revision and routes all traffic to it in a single step, with no intermediate traffic shifting.

  • See how the deploy step is configured, and how Harness handles it if the deployment fails.


Before you begin


Basic strategy step sequence

When you select Basic, Harness adds the following step to your stage execution:

  1. Google Cloud Function Deploy: Deploys the new function revision. Skip Traffic stays at its default of false, so the revision receives full traffic as soon as the deployment completes. There is no separate traffic shift step.

On rollback, Harness runs the Google Cloud Function Rollback step inside a Google Cloud Function Basic Rollback step group.


Stage YAML

A minimal basic stage looks like this.

This example runs on a delegate and deploys to every infrastructure definition in the environment:

This example runs on Harness Cloud and deploys to a single, specific infrastructure definition:


Configure the Google Cloud Function Deploy step

For the basic strategy, the deploy step leaves Skip Traffic at its default so the new revision receives full traffic immediately.

Field
Default
Description

Skip Traffic

false

When true, the deployed revision does not receive traffic until a separate traffic shift step runs. Basic leaves this at the default, so the revision receives full traffic as soon as the deploy step completes.

Command Timeout

10m

Maximum time for the step to complete.

Log Level

info

Log verbosity for the step execution.


Rollback behavior

When the stage failure strategy triggers rollback, the Google Cloud Function Rollback step inside the Google Cloud Function Basic Rollback step group runs automatically.

The rollback step receives the following inputs:

Field
Value
Description

Cloud Function Name

${{rollback.data.FUNCTION_NAME}}

The function to roll back.

Previous Traffic Split

${{rollback.data.ACTIVE_CLOUD_RUN_REVISIONS}}

The revisions that were active before the deployment. Used to restore traffic during rollback.

Gen 2 functions run on a backing Cloud Run service

Google Cloud Functions Gen 2 deploys each function as a Cloud Run service. The deploy step reads and modifies this backing service directly, which is why rollback data stores Cloud Run revisions.

Rollback behavior differs by deployment history:

  • Subsequent deployments: Harness restores the previous serving traffic split on the backing Cloud Run service. Previous Traffic Split holds the revision and traffic percentage that were active before the deployment, and the rollback step applies that split back to the service.

  • First deployment: There is no previous revision to restore traffic to, so Previous Traffic Split has nothing to roll back to.


Next steps

  • Go to Canary for a progressively rolled out deployment.

  • Go to Blue-green for a zero-downtime traffic cutover deployment.

  • Go to Blank canvas to compose steps manually.

Last updated

Was this helpful?