container-builder-local

command module
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

README

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.


Prerequisites

  1. Ensure you have installed:

  2. If the build needs to access a private Google Container Registry, install and configure the Docker credential helper for Google Container Registry.

  3. 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<latest_tag> --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, email google-cloud-dev@googlegroups.com, or join our.

Documentation

Overview

Package main runs the gcb local builder.

Directories

Path Synopsis
Package build implements the logic for executing a single user build.
Package build implements the logic for executing a single user build.
Package common shares methods for local builder.
Package common shares methods for local builder.
Package config provides methods to read a cloudbuild file and convert it to a build proto.
Package config provides methods to read a cloudbuild file and convert it to a build proto.
Package gcloud provides methods to interact with local installed gcloud.
Package gcloud provides methods to interact with local installed gcloud.
Package gsutil provides helper functions for running gsutil commands with Docker.
Package gsutil provides helper functions for running gsutil commands with Docker.
Package logger defines a Logger interface to be used by local builder.
Package logger defines a Logger interface to be used by local builder.
Package metadata provides methods to deal with a metadata container server.
Package metadata provides methods to deal with a metadata container server.
Package runner implements method to run commands.
Package runner implements method to run commands.
Package subst does string substituion in build fields.
Package subst does string substituion in build fields.
Package validate provides methods to validate a build.
Package validate provides methods to validate a build.
Package volume provides methods to deal with docker volumes.
Package volume provides methods to deal with docker volumes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL