Skip to content
Branch: master
Find file History
Latest commit b3b9f0b Feb 12, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
examples/version-file Fix git builder test that assumed alpine Feb 1, 2017
Dockerfile Revert #454 (#459) Feb 12, 2019
README.md GCB rebrand. (#309) Jul 24, 2018
cloudbuild.yaml GCB rebrand. (#309) Jul 24, 2018

README.md

git

This is a tool builder to simply invoke git commands.

Arguments passed to this builder will be passed to git directly, allowing callers to run any Git command.

When executed in the Cloud Build environment, commands are executed with credentials of the builder service account for the project.

Examples

The following examples demonstrate build requests that use this builder.

For these to work, the remote repository must either be public, or the builder service account must have permission to access it.

Clone a Git repository

This cloudbuild.yaml clones a remote Git repository to the build's workspace.

steps:
- name: gcr.io/cloud-builders/git
  args: ['clone', 'https://github.com/GoogleCloudPlatform/cloud-builders']

Push changes to a remote Git repository

This cloudbuild.yaml pushes local changes to a remote Git repository.

steps:
- name: gcr.io/cloud-builders/git
  args: ['push', 'https://source.developers.google.com/p/$PROJECT_ID/r/myrepo', 'master']
You can’t perform that action at this time.