Google Cloud pipeline integration

Use Google Cloud with Codefresh pipelines

Codefresh has native support for Google Cloud in the following areas:

Using Google Container Registries

Google Container registries are fully compliant with the Docker registry API that Codefresh follows. You can connect GCR like any other Docker registry.

The name assigned to the integration must be unique within the account. Using the same name for other integrations or Shared Configuration contexts within pipelines will result in conflicts.
For troubleshooting, see Error: context already exists.

Connecting to GCR

Connecting to GCR

Once the registry is added, you can the standard push step in pipelines. See also the documentation page for working with Docker registries.

Deploying to Google Kubernetes Engine

Codefresh has native support for connecting a GKE cluster in the cluster configuration screen.

Connecting a GKE cluster

Connecting a GKE cluster

Once the cluster is connected, you can use any of the available deployment options for Kubernetes clusters.
You also get access to all other Kubernetes dashboards such as the cluster dashboard or the environment dashboard.

Storing test reports in Google Cloud storage

Codefresh has native support for storing test reports in different storage buckets, including Google Cloud storage. You can connect your Google Cloud storage account to Codefresh through the Cloud Storage options in Pipeline Integrations.

Google cloud storage

Google cloud storage

For detailed instructions, to set up an integration with your Google Cloud storage account in Codefresh, see Cloud storage integrations for pipelines, and to create and store test reports through Codefresh pipelines, see Creating test reports.

Using Google Storage for storing Helm charts

You can connect Google storage as a Helm repository by setting up a Helm integration in Codefresh.

Using Google Cloud for Helm charts

Using Google Cloud for Helm charts

Once you connect your Helm repository you can use it any Codefresh pipeline with the Helm step.

Using Google Cloud build

Codefresh has a native Docker build step for creating Docker images. As an alternative method of building Docker images, you can also use Google Cloud Build in a Codefresh pipeline.

Installing the Codefresh runner from the Google Marketplace

The Codefresh Runner is a Kubernetes native application that allows you to run pipelines on your own Kubernetes cluster (even behind the firewall). Specifically for Google Cloud, the runner is also available via the marketplace.

Traditional Google Cloud deployments

For any other Google Cloud deployment you can use the Google Cloud CLI from a Docker image in a freestyle step.


    title: "Creating a Virtual machine"
    type: "freestyle"
      image: "google/cloud-sdk:slim"
        - echo $KEY_FILE | base64 --decode > key_file.json
        - gcloud compute instances create demo-codefresh --image codefresh-simple-ubuntu-vm --zone europe-west1-b --metadata-from-file --tags http-server --preemptible --quiet   

See the example of uploading to a Google Bucket or creating a VM for more details.

Add your cluster
Manage your Kubernetes cluster
Cloning Git repositories