Google Cloud

How to use Codefresh with Google Cloud

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.

Connecting to GCR

Connecting to GCR

Once the registry is added you can the standard push step 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 test reports. You can store the reports on Google Cloud storage.

Google cloud storage

Google cloud storage

See the full documentation for test reports.

Using Google Storage for storing Helm charts

You can connect Google storage as a Helm repository in the integrations screen.

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

YAML

  create_a_vm:
    title: "Creating a Virtual machine"
    type: "freestyle"
    arguments:
      image: "google/cloud-sdk:slim"
      commands:
        - 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 startup-script=startup.sh --tags http-server --preemptible --quiet   

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