> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/continuous-delivery/3.0/use-deployments/overview-3/basic/blank-canvas.md).

# Blank canvas deployment

Build a Google Cloud Run stage from scratch without a managed Basic or Canary strategy.

The managed deployment strategies (Basic and Canary) add opinionated step sequences and automatic rollback tracking to your stage. The blank canvas approach lets you compose only the steps you need in the order that fits your workflow.

***

### What you will learn <a href="#what-you-will-learn" id="what-you-will-learn"></a>

* When to use the blank canvas approach instead of the managed Basic or Canary strategies.
* Which Google Cloud Run steps are available for manual composition and what each does.
* How to deploy a Cloud Run Job using the blank canvas approach.

***

Use the blank canvas approach when:

* You need a custom step order not covered by Basic or Canary.
* You are deploying a Cloud Run Job.
* You want to add approvals, tests, or conditional steps between deployment actions.

***

### Before you begin <a href="#before-you-begin" id="before-you-begin"></a>

* **A Google Cloud Run service:** Go to [Google Cloud Run services](/continuous-delivery/3.0/use-deployments/overview-3/google-cloud-run-services.md) to set up a service with a manifest and artifact source.
* **A Google Cloud Run infrastructure:** Go to [Google Cloud Run infrastructure](/continuous-delivery/3.0/use-deployments/overview-3/google-cloud-run-infrastructure.md) to connect a GCP project and region.

***

### Set up a blank canvas stage <a href="#set-up-a-blank-canvas-stage" id="set-up-a-blank-canvas-stage"></a>

1. In your pipeline, add a **Deploy** stage with **Deployment Target** set to **Google Cloud Run**.
2. On the **Execution** tab, select **Blank Canvas** when prompted to choose a deployment strategy.
3. Click **+ Add Step** to add individual steps in the order you need.

The following Google Cloud Run steps are available:

| Step                               | Description                                                                                                                                |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| **Google Cloud Run Deploy**        | Applies the service manifest using `gcloud run services replace`, optionally shifts all traffic, and saves rollback data internally.       |
| **Google Cloud Run Traffic Shift** | Routes traffic to a specific revision using `gcloud run services update-traffic`. Configure the target distribution as a JSON object.      |
| **Google Cloud Run Rollback**      | Reverts to the pre-deployment revision configuration using rollback data saved by the Deploy step. Add this to the stage's rollback phase. |
| **Google Cloud Run Job**           | Deploys or executes a Cloud Run Job using `gcloud run jobs replace` and `gcloud run jobs execute`.                                         |

{% hint style="info" %}
**No Prepare Rollback step**

There is no Prepare Rollback step in the blank canvas step library. The Deploy step saves rollback data automatically. Add the Rollback step only to the stage's rollback phase, not to the main execution flow.
{% endhint %}

***

### Deploy a Cloud Run Job <a href="#deploy-a-cloud-run-job" id="deploy-a-cloud-run-job"></a>

Cloud Run Job deployments use the blank canvas approach. The Google Cloud Run Job step supports two modes:

* **Execute only:** set **Job Name** to run `gcloud run jobs execute` against an existing job definition.
* **Replace and execute:** leave **Job Name** empty to replace the job definition from the service manifest using `gcloud run jobs replace`, then execute the updated job.

Configure the following fields:

| Field                       | Description                                                                                                                                                                    |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Job Name**                | The name of the Cloud Run job to execute. When set, the step runs execute only. Leave empty to replace the job definition from the service manifest first.                     |
| **Replace Command Options** | Additional flags passed to `gcloud run jobs replace` (for example, `--async --verbosity=debug`). Only applies when **Job Name** is empty. Does not trigger replace on its own. |
| **Execute Command Options** | Additional flags passed to `gcloud run jobs execute` (for example, `--update-env-vars=key1=value1`).                                                                           |

GCP Connector, GCP Region, and GCP Project are available under **+ More options**.

***

### Next steps <a href="#next-steps" id="next-steps"></a>

* Go to [Google Cloud Run basic deployment](/continuous-delivery/3.0/use-deployments/overview-3/basic.md) for a managed single-revision deploy.
* Go to [Google Cloud Run canary deployment](/continuous-delivery/3.0/use-deployments/overview-3/basic/canary.md) for managed gradual traffic shifting.
* Go to [Step library](https://github.com/harness/harness-developer-hub/tree/main/3k-docs/delivery/continuous-delivery/use-deployments/google-cloud/google-cloud-run/step-library/README.md) for field references on individual steps.

{% @harness-feedback/feedback %}
