Tracks the commits in a git repository.
-
uri
: Required. The location of the repository. -
branch
: Required. The branch to track. -
private_key
: Optional. Private key to use when pulling/pushing. Example:private_key: | -----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKCAQEAtCS10/f7W7lkQaSgD/mVeaSOvSF9ql4hf/zfMwfVGgHWjj+W <Lots more text> DWiJL+OFeg9kawcUL6hQ8JeXPhlImG6RTUffma9+iGQyyBMCGd1l -----END RSA PRIVATE KEY-----
-
paths
: Optional. If specified (as a list of glob patterns), only changes to the specified files will yield new versions. -
ignore_paths
: Optional. The inverse ofpaths
; changes to the specified files are ignored.
Resource configuration for a private repo:
resources:
- name: source-code
type: git
source:
uri: [email protected]:concourse/git-resource.git
branch: master
private_key: |
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAtCS10/f7W7lkQaSgD/mVeaSOvSF9ql4hf/zfMwfVGgHWjj+W
<Lots more text>
DWiJL+OFeg9kawcUL6hQ8JeXPhlImG6RTUffma9+iGQyyBMCGd1l
-----END RSA PRIVATE KEY-----
Fetching a repo with only 100 commits of history:
- get: source-code
params: {depth: 100}
Pushing local commits to the repo:
- get: some-other-repo
- put: source-code
params: {repository: some-other-repo}
The repository is cloned (or pulled if already present), and any commits
made after the given version are returned. If no version is given, the ref
for HEAD
is returned.
Any commits that contain the string [ci skip]
will be ignored. This
allows you to commit to your repository without triggering a new version.
Clones the repository to the destination, and locks it down to a given ref. Returns the resulting ref as the version.
Submodules are initialized and updated recursively.
-
depth
: Optional. If a positive integer is given, shallow clone the repository using the--depth
option. -
fetch
: Optional. Additional branches to fetch so that they're available to the build. -
submodules
: Optional. Ifnone
, submodules will not be fetched. If specified as a list of paths, only the given paths will be fetched. If not specified, or ifall
is explicitly specified, all submodules are fetched.
Push a repository to the source's URI and branch. All tags are also pushed to the source.
-
repository
: Required. The path of the repository to push to the source. -
rebase
: Optional. If pushing fails with non-fast-forward, continuously attempt rebasing and pushing. -
tag
: Optional If this is set then HEAD will be tagged. The value should be a path to a file containing the name of the tag. -
tag_prefix
: Optional. If specified, the tag read from the file will be prepended with this string. This is useful for addingv
in front of version numbers.