Need help with cloud-build-local?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

GoogleCloudPlatform
240 Stars 40 Forks Apache License 2.0 41 Commits 43 Opened issues

Description

Local Builder runs Google Cloud Build builds locally, allowing faster debugging, less vendor lock-in, and integration into local build and test workflows.

Services available

!
?

Need anything else?

Contributors list

Google Cloud Build Local Builder

Local Builder runs Google Cloud Build locally, allowing easier debugging, execution of builds on your own hardware, and integration into local build and test workflows. Please note that the Local Builder is not 100% feature-compatible with the hosted GCB service.

NOTE: The Cloud Build local builder is maintained at best effort as a local debugging tool for Cloud Build. It does not support 100% feature parity with the hosted Cloud Build service and should not be used for production workloads.


Prerequisites

  1. Ensure you have installed:
*   [gcloud](https://cloud.google.com/sdk/docs/quickstarts)
*   [Docker](https://www.docker.com/)
*   [Go](https://golang.org/doc/install) (if you want to compile Local
    Builder from source)
  1. If the build needs to access a private Google Container Registry, install and configure the Docker credential helper for Google Container Registry.

  2. Configure your project for the gcloud tool, where

    [PROJECT_ID]
    is your Cloud Platform project ID:
    gcloud config set project [PROJECT-ID]
    

Install using gcloud

  1. Install by running the following command:

    gcloud components install cloud-build-local
    

    After successful installation, you will have

    cloud-build-local
    in your PATH as part of the Google Cloud SDK binaries.
  2. To see all of the commands, run:

    $ cloud-build-local --help
    

    The Local Builder's command is

    $ cloud-build-local
    .

Download the latest binaries

The latest binaries are available in a GCS bucket.

Download the latest binaries from GCS.

To run a build:

./cloud-build-local_{linux,darwin}_{386,amd64}-v --dryrun=false --config=path/to/cloudbuild.yaml path/to/code

Developing and contributing to the Local Builder

See the contributing instructions.

Limitations

  • Only one build can be run at a time on a given host.
  • The tool works on the following platforms:
    • Linux
    • macOS

Support

Our documentation has a page on getting support. If you have general questions about Local Builder or Cloud Build, you can file issues here on GitHub, or see:

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.