An alphanumeric string (underscores are permitted) that identifies the resource.
GitRepo for this resource type.
Specifies all configuration selections for the resource.
|The name of the source control integration. Currently supported integration types are:||Required|
The path of the repository from the integration root
If the tag is not specified, the default branch will be triggered.
If this tag is not specified, all branches are matched by default.
If this tag is not specified, the
Used to specify a collection of tags and releases upon which a new version is created
If this tag is not specified, all tags are matched by default.
Used to control whether the resource will be updated on specified events
If this tag is not specified,
For more information about using this tag, see Triggering On a Git Repository Change.
Used to control whether previously triggered runs are canceled for new webhooks
All values for this tag are false by default.
For more information about using this tag, see Cancelling Previous Runs On a Git Repository Change.
Uses a positive integer to set the depth at which the repo is (shallow) cloned/fetched
|Used to select the protocol to be used when cloning the repo. Supported values are ||Optional|
This configuration can be used to pin the resource to a specific version. The pinned resource version will be used by the steps that reference this resource as an input and newer versions will be ignored.
Users have two configuration options when selecting the GitRepo resource version to be pinned:
Steps that use the resource as an output can still produce new versions. New versions will be visible for steps using the resource as an input as long as they are part of the same run of the step that created the version.
When creating a new run, manual custom trigger can still be used to override the pinned version to a different one.
GitRepo is used in a step, a set of environment variables is automatically made available that you can use in your step.
|Relative path of the resource|
|Name of branch on which the commit occurred. If it was created for a pull request, this is the base branch|
|Commit message of the version being used|
|SHA of the commit of the version being used|
|URL to the commit|
|Name of the committer for the SHA being used|
|Git integration name|
|URL of the Git Provider integration|
|Name of the Git repo|
|HTTPS URL for the Git repository|
|SSH URL for the Git repository.|
|URL for the Git repository|
|Default branch of the Git repository|
|If a tag name was present in the current version, this will be the tag name|
|True if the version is a git release based build. Supported only if the integration is GitHub|
|The ID number of the pull request|
|Name of the base branch into which the pull request changes will be merged|
|Source URL of the pull request|
|Source HTTPS URL of the pull request|
|Source SSH URL of the pull request|
|Full path of the resource folder on the node|
|Input or output resource|
JSON object containing the details of the SHA
|SHA before the commit was made|
|The commit SHA of base branch in a PR|
|Compare URL for the commit|
|If a git tag is created, this holds the message if it is present|
|If a release is created, this holds the name of the release|
|If a release is created, this holds the description of the release|
|If a release is created, this holds the date of the release|
|Details of when the last author logged in|
|Email of the author|
The following example may be useful to reference a single directory in a source repository that contains source code for a single microservice within a larger project.
By default, a GitRepo triggers on a commit, but this can be changed in the
buildOn attributes. For more information about triggering, see Triggering Pipelines and Steps.
The following example pipeline triggers the first step on the GitRepo resource. The step uses the environment variables exposed by the GitRepo resource to navigate to the path where the git repository is cloned on the build node, and to execute a script in that directory.
In this example, the GitRepo is only updated for pull requests to master.