{"id":16127280,"url":"https://github.com/justinbeckwith/gcbuild","last_synced_at":"2025-03-16T09:32:14.382Z","repository":{"id":38551827,"uuid":"168907082","full_name":"JustinBeckwith/gcbuild","owner":"JustinBeckwith","description":"👷🏼‍♂️🛠 A super simple CLI and API for using Google Cloud Build ","archived":false,"fork":false,"pushed_at":"2025-02-28T17:29:39.000Z","size":420,"stargazers_count":7,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-16T00:41:17.830Z","etag":null,"topics":["build","cli","google","nodejs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JustinBeckwith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-03T03:55:05.000Z","updated_at":"2025-02-28T17:28:48.000Z","dependencies_parsed_at":"2023-10-19T14:47:32.301Z","dependency_job_id":"2756b6ed-bf14-4cb1-a989-f08f10036820","html_url":"https://github.com/JustinBeckwith/gcbuild","commit_stats":{"total_commits":154,"total_committers":6,"mean_commits":"25.666666666666668","dds":"0.24025974025974028","last_synced_commit":"fcb7cab7436fd271e6d50ab38265bd82e3fcb4f3"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustinBeckwith%2Fgcbuild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustinBeckwith%2Fgcbuild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustinBeckwith%2Fgcbuild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustinBeckwith%2Fgcbuild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JustinBeckwith","download_url":"https://codeload.github.com/JustinBeckwith/gcbuild/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243852428,"owners_count":20358267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","cli","google","nodejs"],"created_at":"2024-10-09T21:43:41.700Z","updated_at":"2025-03-16T09:32:13.569Z","avatar_url":"https://github.com/JustinBeckwith.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gcbuild\n\u003e A super simple CLI and API for using Google Cloud Build.\n\n[![NPM Version](https://img.shields.io/npm/v/gcbuild.svg)](https://npmjs.org/package/gcbuild)\n[![Build Status](https://api.cirrus-ci.com/github/JustinBeckwith/gcbuild.svg)](https://cirrus-ci.com/github/JustinBeckwith/gcbuild)\n[![codecov](https://codecov.io/gh/JustinBeckwith/gcbuild/branch/main/graph/badge.svg)](https://codecov.io/gh/JustinBeckwith/gcbuild)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Installation\n```sh\n$ npm install gcbuild\n```\n\n## Command Line\n`gcb` is a convenient way to submit jobs to Google Cloud Build.  To use as a command line application:\n\n```sh\n$ npm install --save-dev gcbuild\n```\n\nThen from your `package.json`, it's super easy to add a deploy script:\n\n```json\n\"scripts\": {\n  \"deploy\": \"gcb\"\n}\n```\n\n### Positional arguments\n\n##### SOURCE\nLocation of the sources to be deployed.  If not specified, assumes the current working directory.\n\n### Flags\n\n##### --config\nThe YAML or JSON file to use as the build configuration file. Defaults to 'cloudbuild.yaml' if not specified.\n\n##### --tag\nThe tag to use with a \"docker build\" image creation.\n\n### Examples\n\n```sh\n# Create an image for the current working directory.\n$ gcb\n\n# If there's a Dockerfile in the CWD, I can also specify a tag\n$ gcb --tag my-image-name\n\n# Use a build file not named `cloudbuild.yaml`\n$ gcb --config suchbuild.json\n\n# Perform a build from another location on disk\n$ gcb ~/Code/verydocker\n```\n\n## API\nYou can also use this as a regular old API.\n\n```js\nimport {build} from 'gcb';\n\nasync function main() {\n  await build({\n    source: '/path/to/source',\n    ....\n  });\n}\nmain().catch(console.error);\n```\n\n## Authentication\nThis library uses [google-auth-library](https://www.npmjs.com/package/google-auth-library) under the hood to provide authentication.  That means you can authenticate a few ways.\n\n#### Using a service account\nOne of the reasons this library exists is to provide a nodejs native deployment in environments where you don't want to have the Cloud SDK installed.\n\nFor this method, you'll need to [create a service account](https://cloud.google.com/docs/authentication/getting-started), and download a key.\n\n1. In the GCP Console, go to the [Create service account key](https://console.cloud.google.com/apis/credentials/serviceaccountkey?_ga=2.44822625.-475179053.1491320180) page.\n1. From the Service account drop-down list, select New service account.\n1. In the Service account name field, enter a name.\n1. From the Role drop-down list, select Project \u003e Owner.\n1. Click Create. A JSON file that contains your key downloads to your computer.\n\n```sh\n$ export GOOGLE_APPLICATION_CREDENTIALS=\"./keys.json\"\n$ gcb .\n```\n\n#### Using application default credentials\nIf you plan on only using this from your machine, and you have the Google Cloud SDK installed, you can just use application default credentials like this:\n\n```sh\n$ gcloud auth login\n$ gcloud auth application-default login\n$ gcloud config set project 'YOUR-AWESOME-PROJECT'\n$ gcb .\n```\n\n## License\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinbeckwith%2Fgcbuild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinbeckwith%2Fgcbuild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinbeckwith%2Fgcbuild/lists"}