Spoofs a simple execution of cloudbuild locally
npm install @cleandns/localbuildA build tool that spoofs the execution of Google Cloud Build locally. Localbuild is used throughout the CleanDNS stack to test and debug Cloud Build configurations without having to push changes to a remote repository, and to allow local dev environments to use secrets from Secret Manager.
cloudbuild.yaml file and executes the build steps locally.npm install -g @cleandns/localbuild
Alternatively, it can be run without global install using npx:
npx -y localbuild ...
* -c, --config: Path to the cloudbuild.yaml file (default: cloudbuild.yaml).
* -b, --build: The ID of the build step to execute (default: BUILD). For more information about the structure of Cloud Build files, see the documentation.
* -p, --project: The Google Cloud project ID.
* -t, --target: The Docker build target.
localbuild -c path/to/cloudbuild.yaml -b BUILD -p my-project -t my-target
Or using npx:
npx -y localbuild --config path/to/cloudbuild.yaml --project my-project --target my-target
This project is written in TypeScript (do not modify the raw javascript document as this is a build artifact). You can build the project using the tsc command if Typescript is installed globally.
License
This project is licensed under the ISC license.