Reference documentation and code samples for the Google Cloud Build V1 Client class GitSource.
Location of the source in any accessible Git repository.
Generated from protobuf message google.devtools.cloudbuild.v1.GitSource
Namespace
Google \ Cloud \ Build \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ url |
string
Location of the Git repo to build. This will be used as a |
↳ dir |
string
Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's |
↳ revision |
string
The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref. Cloud Build uses |
getUrl
Location of the Git repo to build.
This will be used as a git remote, see
https://git-scm.com/docs/git-remote.
| Returns | |
|---|---|
| Type | Description |
string |
|
setUrl
Location of the Git repo to build.
This will be used as a git remote, see
https://git-scm.com/docs/git-remote.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDir
Directory, relative to the source root, in which to run the build.
This must be a relative path. If a step's dir is specified and is an
absolute path, this value is ignored for that step's execution.
| Returns | |
|---|---|
| Type | Description |
string |
|
setDir
Directory, relative to the source root, in which to run the build.
This must be a relative path. If a step's dir is specified and is an
absolute path, this value is ignored for that step's execution.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getRevision
The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref.
Cloud Build uses git fetch to fetch the revision from the Git
repository; therefore make sure that the string you provide for revision
is parsable by the command. For information on string values accepted by
git fetch, see
https://git-scm.com/docs/gitrevisions#_specifying_revisions. For
information on git fetch, see https://git-scm.com/docs/git-fetch.
| Returns | |
|---|---|
| Type | Description |
string |
|
setRevision
The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref.
Cloud Build uses git fetch to fetch the revision from the Git
repository; therefore make sure that the string you provide for revision
is parsable by the command. For information on string values accepted by
git fetch, see
https://git-scm.com/docs/gitrevisions#_specifying_revisions. For
information on git fetch, see https://git-scm.com/docs/git-fetch.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|