cbtctl

command module
v0.0.0-...-feeccaf Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: MIT Imports: 1 Imported by: 0

README

cbtctl

A CLI tool for GCP Cloud Build Triggers

Usage

Run a build trigger with substitutions
$ cbtctl run --project <GCP Project Name> --trigger <Trigger Name> --substitutions "_VAR=val"
On Cloud Build

By making cbtctl container connect to the network provided by Cloud Build, we can use cbtctl even on the Cloud Build.

Example cloudbuild.yaml:
steps:
    - name: gcr.io/cloud-builders/docker:19.03.9
      args:
          - run
          - --rm
          - --network
          - cloudbuild
          - 110y/cbtctl:0.0.1
          - run
          - --project=<GCP Project Name>
          - --trigger=<Trigger Name>
          - --substitutions="VAR=val"

Motivation

While gcloud have a builds triggers subcommand which controls the build triggers, not all build triggers features are supported by gcloud. For example, we can run a build trigger by executing gcloud alpha builds triggers run, however, we can not use the substitutions feature for the build trigger with such gcloud command. That's why I made cbtctl. cbtctl aims to support build triggers features which are not supported by gcloud at this time.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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