Project

gbuild

0.0
No release in over 3 years
Low commit activity in last 3 years
gbuild
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 10.0
~> 3.0

Runtime

 Project Readme

gbuild

Fast Google Cloud Build builds without YAMLs or Git triggers.

  • Uses Kaniko and caching
  • Also removes the build source and logs (Google doesn't do this automatically)
  • Requires gcloud and gsutil

Install

Recommended:

Use binaries for Linux/Mac from https://github.com/matti/gbuild/releases

wget https://github.com/matti/gbuild/releases/download/v0.3.0/gbuild-linux-amd64-v0.3.0
chmod +x gbuild-linux-amd64-v0.3.0
mv gbuild-linux-amd64-v0.3.0 /usr/local/bin/gbuild

Or use rubygems:

gem install gbuild

Usage

Basic usage:

gbuild gcr.io/project/name

Advanced usage:

gbuild eu.gcr.io/project/name:latest \
    --build-arg first=1 --build-arg second=2 \
    --no-cache \
    --clean-source \
    --timeout 30

Clean all logs and sources:

gbuild clean project

Delete an image:

gbuild delete gcr.io/project/name

Full usage:

Usage:
    gbuild [OPTIONS] IMAGE

Parameters:
    IMAGE                         GCR URL (gcr.io/project/image)

Options:
    --context CONTEXT             build context, defaults to current working directory
    --build-arg BUILD_ARG         docker build argument, can be given multiple times
    --[no-]cache                  cache layers (default: true)
    --[no-]clean-source           clean source (default: true)
    --[no-]clean-log              clean log (default: true)
    --debug                       debug (default: false)
    --dockerfile DOCKERFILE       path to Dockerfile (default: nil)
    --project PROJECT             gcloud project, defaults to project part in GCR URL
    --timeout TIMEOUT             build timeout
    -h, --help                    print help