Skip to content

Commit

Permalink
feat(v1): Update third party clodubuild.proto library to include git_…
Browse files Browse the repository at this point in the history
…source (#400)

* feat: Update third party clodubuild.proto library to include git_source

Committer: @monicaliu
PiperOrigin-RevId: 524851242

Source-Link: googleapis/googleapis@5333983

Source-Link: googleapis/googleapis-gen@41cced8
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDFjY2VkODNmNzU5NGEzOWM1OTBjMzhkYzhjM2Y5MDU5ODVjNjk3OSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Apr 17, 2023
1 parent b460e44 commit eddde49
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import GetBuildTriggerRequest
from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import GetWorkerPoolRequest
from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import GitHubEventsConfig
from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import GitSource
from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import Hash
from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import InlineSecret
from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import ListBuildsRequest
Expand Down Expand Up @@ -133,6 +134,7 @@
"GetBuildTriggerRequest",
"GetWorkerPoolRequest",
"GitHubEventsConfig",
"GitSource",
"Hash",
"InlineSecret",
"ListBuildsRequest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
from .types.cloudbuild import GetBuildTriggerRequest
from .types.cloudbuild import GetWorkerPoolRequest
from .types.cloudbuild import GitHubEventsConfig
from .types.cloudbuild import GitSource
from .types.cloudbuild import Hash
from .types.cloudbuild import InlineSecret
from .types.cloudbuild import ListBuildsRequest
Expand Down Expand Up @@ -109,6 +110,7 @@
"GetBuildTriggerRequest",
"GetWorkerPoolRequest",
"GitHubEventsConfig",
"GitSource",
"Hash",
"InlineSecret",
"ListBuildTriggersRequest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
GetBuildTriggerRequest,
GetWorkerPoolRequest,
GitHubEventsConfig,
GitSource,
Hash,
InlineSecret,
ListBuildsRequest,
Expand Down Expand Up @@ -101,6 +102,7 @@
"GetBuildTriggerRequest",
"GetWorkerPoolRequest",
"GitHubEventsConfig",
"GitSource",
"Hash",
"InlineSecret",
"ListBuildsRequest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"RetryBuildRequest",
"RunBuildTriggerRequest",
"StorageSource",
"GitSource",
"RepoSource",
"StorageSourceManifest",
"Source",
Expand Down Expand Up @@ -186,6 +187,49 @@ class StorageSource(proto.Message):
)


class GitSource(proto.Message):
r"""Location of the source in any accessible Git repository.
Attributes:
url (str):
Location of the Git repo to build.
This will be used as a ``git remote``, see
https://git-scm.com/docs/git-remote.
dir_ (str):
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.
revision (str):
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.
"""

url: str = proto.Field(
proto.STRING,
number=1,
)
dir_: str = proto.Field(
proto.STRING,
number=5,
)
revision: str = proto.Field(
proto.STRING,
number=6,
)


class RepoSource(proto.Message):
r"""Location of the source in a Google Cloud Source Repository.
Expand Down Expand Up @@ -328,6 +372,11 @@ class Source(proto.Message):
If provided, get the source from this
location in a Cloud Source Repository.
This field is a member of `oneof`_ ``source``.
git_source (google.cloud.devtools.cloudbuild_v1.types.GitSource):
If provided, get the source from this Git
repository.
This field is a member of `oneof`_ ``source``.
storage_source_manifest (google.cloud.devtools.cloudbuild_v1.types.StorageSourceManifest):
If provided, get the source from this manifest in Google
Expand All @@ -349,6 +398,12 @@ class Source(proto.Message):
oneof="source",
message="RepoSource",
)
git_source: "GitSource" = proto.Field(
proto.MESSAGE,
number=5,
oneof="source",
message="GitSource",
)
storage_source_manifest: "StorageSourceManifest" = proto.Field(
proto.MESSAGE,
number=8,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-build",
"version": "3.14.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-build",
"version": "3.14.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5884,6 +5884,11 @@ def test_create_build_rest(request_type):
"invert_regex": True,
"substitutions": {},
},
"git_source": {
"url": "url_value",
"dir_": "dir__value",
"revision": "revision_value",
},
"storage_source_manifest": {
"bucket": "bucket_value",
"object_": "object__value",
Expand Down Expand Up @@ -6223,6 +6228,11 @@ def test_create_build_rest_bad_request(
"invert_regex": True,
"substitutions": {},
},
"git_source": {
"url": "url_value",
"dir_": "dir__value",
"revision": "revision_value",
},
"storage_source_manifest": {
"bucket": "bucket_value",
"object_": "object__value",
Expand Down Expand Up @@ -7971,6 +7981,11 @@ def test_create_build_trigger_rest(request_type):
"generation": 1068,
},
"repo_source": {},
"git_source": {
"url": "url_value",
"dir_": "dir__value",
"revision": "revision_value",
},
"storage_source_manifest": {
"bucket": "bucket_value",
"object_": "object__value",
Expand Down Expand Up @@ -8376,6 +8391,11 @@ def test_create_build_trigger_rest_bad_request(
"generation": 1068,
},
"repo_source": {},
"git_source": {
"url": "url_value",
"dir_": "dir__value",
"revision": "revision_value",
},
"storage_source_manifest": {
"bucket": "bucket_value",
"object_": "object__value",
Expand Down Expand Up @@ -9577,6 +9597,11 @@ def test_update_build_trigger_rest(request_type):
"generation": 1068,
},
"repo_source": {},
"git_source": {
"url": "url_value",
"dir_": "dir__value",
"revision": "revision_value",
},
"storage_source_manifest": {
"bucket": "bucket_value",
"object_": "object__value",
Expand Down Expand Up @@ -9985,6 +10010,11 @@ def test_update_build_trigger_rest_bad_request(
"generation": 1068,
},
"repo_source": {},
"git_source": {
"url": "url_value",
"dir_": "dir__value",
"revision": "revision_value",
},
"storage_source_manifest": {
"bucket": "bucket_value",
"object_": "object__value",
Expand Down

0 comments on commit eddde49

Please sign in to comment.