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

Google Cloud Functions services

Configure a Google Cloud Functions service with a function definition manifest, environment version, and artifact source.

A Google Cloud Functions service defines the function you deploy: a function definition manifest linked from your Git repository, the Google Cloud Function environment version, and the artifact source Harness fetches at deploy time.


What you will learn from this topic

  • How to link a function definition manifest from a Git repository.

  • How to set the Google Cloud Function environment version and add an artifact source.


Before you begin

  • A Git repository, connected through Harness Code, GitHub, Git, GitLab, or Bitbucket, that contains the function definition file.

  • The branch and file or folder path of the function definition file in that repository.


Create a Google Cloud Functions service

  1. Go to Services and click New Service, or edit an existing Google Cloud Functions service.

  2. Enter a Name. Harness generates the Id automatically, for example service_google-cloud-function_f2a1.

  3. Under Link the function file from your Git repository, click + Add to add the function definition manifest.

  4. Set the Google Cloud Function Environment Version.

  5. Under Artifact source, click + Add to add the artifact source for the deployable package.

  6. Expand Advanced or Metadata to configure optional settings.

  7. Click Save.


Add a manifest

Clicking + Add under Link the function file from your Git repository opens the Add Manifest dialog. The manifest type is fixed to Google Cloud Function Definition.

Field
Default
Description

Type

Google Cloud Function Definition

The manifest type. Fixed and not configurable.

Source

Harness Code

The Git provider that hosts the function definition file. Also supports GitHub, Git, GitLab, and Bitbucket.

ID

—

A name that identifies this manifest.

Repository

—

The Harness repository that contains the function definition file.

Fetch

Branch

How Harness locates the file in the repository.

Branch

—

The branch to fetch the file from. Shown when Fetch is set to Branch.

File/Folder Path

—

The path to the function definition file in the repository.


Add an artifact source

Clicking + Add under Artifact source opens the Add Primary Artifact dialog. Artifacts define the source of your application code, and Harness uses these details to fetch the specific version needed for the deployment. Google Cloud Storage is the only supported artifact type.

Google Cloud Storage

Field
Description

ID

A name that identifies this artifact.

Connector

The connector used to authenticate to Google Cloud Storage.

Project

The Google Cloud project that contains the storage bucket.

Bucket

The Google Cloud Storage bucket that contains the artifact.

Artifact Path

The path to the artifact file in the bucket.


Configure advanced options

The service editor includes collapsible Advanced and Metadata sections for additional, optional configuration.


Plugin image reference

Each Google Cloud Functions step runs a dedicated plugin image. The image is embedded in the step template and is not user-configurable.

Step
Plugin image

Deploy

harnessdev/google-cloud-function-deploy:0.0.2

Traffic shift

harnessdev/google-cloud-function-traffic-shift:0.0.2

Rollback

harnessdev/google-cloud-function-rollback:0.0.2

Go to Google Cloud Functions step library to review each step's inputs and outputs.


Next steps

Last updated

Was this helpful?