diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index ae4a522..a3da1b0 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:39f0f3f2be02ef036e297e376fe3b6256775576da8a6ccb1d5eeb80f4c8bf8fb -# created: 2023-07-17T15:20:13.819193964Z + digest: sha256:3e3800bb100af5d7f9e810d48212b37812c1856d20ffeafb99ebe66461b61fc7 +# created: 2023-08-02T10:53:29.114535628Z diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 67d70a1..029bd34 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -20,9 +20,9 @@ cachetools==5.2.0 \ --hash=sha256:6a94c6402995a99c3970cc7e4884bb60b4a8639938157eeed436098bf9831757 \ --hash=sha256:f9f17d2aec496a9aa6b76f53e3b614c965223c061982d434d160f930c698a9db # via google-auth -certifi==2022.12.7 \ - --hash=sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3 \ - --hash=sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18 +certifi==2023.7.22 \ + --hash=sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082 \ + --hash=sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9 # via requests cffi==1.15.1 \ --hash=sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5 \ @@ -113,30 +113,30 @@ commonmark==0.9.1 \ --hash=sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60 \ --hash=sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9 # via rich -cryptography==41.0.2 \ - --hash=sha256:01f1d9e537f9a15b037d5d9ee442b8c22e3ae11ce65ea1f3316a41c78756b711 \ - --hash=sha256:079347de771f9282fbfe0e0236c716686950c19dee1b76240ab09ce1624d76d7 \ - --hash=sha256:182be4171f9332b6741ee818ec27daff9fb00349f706629f5cbf417bd50e66fd \ - --hash=sha256:192255f539d7a89f2102d07d7375b1e0a81f7478925b3bc2e0549ebf739dae0e \ - --hash=sha256:2a034bf7d9ca894720f2ec1d8b7b5832d7e363571828037f9e0c4f18c1b58a58 \ - --hash=sha256:342f3767e25876751e14f8459ad85e77e660537ca0a066e10e75df9c9e9099f0 \ - --hash=sha256:439c3cc4c0d42fa999b83ded80a9a1fb54d53c58d6e59234cfe97f241e6c781d \ - --hash=sha256:49c3222bb8f8e800aead2e376cbef687bc9e3cb9b58b29a261210456a7783d83 \ - --hash=sha256:674b669d5daa64206c38e507808aae49904c988fa0a71c935e7006a3e1e83831 \ - --hash=sha256:7a9a3bced53b7f09da251685224d6a260c3cb291768f54954e28f03ef14e3766 \ - --hash=sha256:7af244b012711a26196450d34f483357e42aeddb04128885d95a69bd8b14b69b \ - --hash=sha256:7d230bf856164de164ecb615ccc14c7fc6de6906ddd5b491f3af90d3514c925c \ - --hash=sha256:84609ade00a6ec59a89729e87a503c6e36af98ddcd566d5f3be52e29ba993182 \ - --hash=sha256:9a6673c1828db6270b76b22cc696f40cde9043eb90373da5c2f8f2158957f42f \ - --hash=sha256:9b6d717393dbae53d4e52684ef4f022444fc1cce3c48c38cb74fca29e1f08eaa \ - --hash=sha256:9c3fe6534d59d071ee82081ca3d71eed3210f76ebd0361798c74abc2bcf347d4 \ - --hash=sha256:a719399b99377b218dac6cf547b6ec54e6ef20207b6165126a280b0ce97e0d2a \ - --hash=sha256:b332cba64d99a70c1e0836902720887fb4529ea49ea7f5462cf6640e095e11d2 \ - --hash=sha256:d124682c7a23c9764e54ca9ab5b308b14b18eba02722b8659fb238546de83a76 \ - --hash=sha256:d73f419a56d74fef257955f51b18d046f3506270a5fd2ac5febbfa259d6c0fa5 \ - --hash=sha256:f0dc40e6f7aa37af01aba07277d3d64d5a03dc66d682097541ec4da03cc140ee \ - --hash=sha256:f14ad275364c8b4e525d018f6716537ae7b6d369c094805cae45300847e0894f \ - --hash=sha256:f772610fe364372de33d76edcd313636a25684edb94cee53fd790195f5989d14 +cryptography==41.0.3 \ + --hash=sha256:0d09fb5356f975974dbcb595ad2d178305e5050656affb7890a1583f5e02a306 \ + --hash=sha256:23c2d778cf829f7d0ae180600b17e9fceea3c2ef8b31a99e3c694cbbf3a24b84 \ + --hash=sha256:3fb248989b6363906827284cd20cca63bb1a757e0a2864d4c1682a985e3dca47 \ + --hash=sha256:41d7aa7cdfded09b3d73a47f429c298e80796c8e825ddfadc84c8a7f12df212d \ + --hash=sha256:42cb413e01a5d36da9929baa9d70ca90d90b969269e5a12d39c1e0d475010116 \ + --hash=sha256:4c2f0d35703d61002a2bbdcf15548ebb701cfdd83cdc12471d2bae80878a4207 \ + --hash=sha256:4fd871184321100fb400d759ad0cddddf284c4b696568204d281c902fc7b0d81 \ + --hash=sha256:5259cb659aa43005eb55a0e4ff2c825ca111a0da1814202c64d28a985d33b087 \ + --hash=sha256:57a51b89f954f216a81c9d057bf1a24e2f36e764a1ca9a501a6964eb4a6800dd \ + --hash=sha256:652627a055cb52a84f8c448185922241dd5217443ca194d5739b44612c5e6507 \ + --hash=sha256:67e120e9a577c64fe1f611e53b30b3e69744e5910ff3b6e97e935aeb96005858 \ + --hash=sha256:6af1c6387c531cd364b72c28daa29232162010d952ceb7e5ca8e2827526aceae \ + --hash=sha256:6d192741113ef5e30d89dcb5b956ef4e1578f304708701b8b73d38e3e1461f34 \ + --hash=sha256:7efe8041897fe7a50863e51b77789b657a133c75c3b094e51b5e4b5cec7bf906 \ + --hash=sha256:84537453d57f55a50a5b6835622ee405816999a7113267739a1b4581f83535bd \ + --hash=sha256:8f09daa483aedea50d249ef98ed500569841d6498aa9c9f4b0531b9964658922 \ + --hash=sha256:95dd7f261bb76948b52a5330ba5202b91a26fbac13ad0e9fc8a3ac04752058c7 \ + --hash=sha256:a74fbcdb2a0d46fe00504f571a2a540532f4c188e6ccf26f1f178480117b33c4 \ + --hash=sha256:a983e441a00a9d57a4d7c91b3116a37ae602907a7618b882c8013b5762e80574 \ + --hash=sha256:ab8de0d091acbf778f74286f4989cf3d1528336af1b59f3e5d2ebca8b5fe49e1 \ + --hash=sha256:aeb57c421b34af8f9fe830e1955bf493a86a7996cc1338fe41b30047d16e962c \ + --hash=sha256:ce785cf81a7bdade534297ef9e490ddff800d956625020ab2ec2780a556c313e \ + --hash=sha256:d0d651aa754ef58d75cec6edfbd21259d93810b73f6ec246436a21b7841908de # via # gcp-releasetool # secretstorage @@ -396,9 +396,9 @@ pycparser==2.21 \ --hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \ --hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206 # via cffi -pygments==2.13.0 \ - --hash=sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1 \ - --hash=sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42 +pygments==2.15.0 \ + --hash=sha256:77a3299119af881904cd5ecd1ac6a66214b6e9bed1f2db16993b54adede64094 \ + --hash=sha256:f7e36cffc4c517fbc252861b9a6e4644ca0e5abadf9a113c72d1358ad09b9500 # via # readme-renderer # rich diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9e3898f..19409cb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,6 +26,6 @@ repos: hooks: - id: black - repo: https://github.com/pycqa/flake8 - rev: 3.9.2 + rev: 6.1.0 hooks: - id: flake8 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 60a50ee..f80372a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.19.0" + ".": "3.20.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 337d784..c5875d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ [1]: https://pypi.org/project/google-cloud-build/#history +## [3.20.0](https://github.com/googleapis/python-cloudbuild/compare/v3.19.0...v3.20.0) (2023-08-08) + + +### Features + +* Add automap_substitutions flag to use substitutions as envs in Cloud Build ([a1e03be](https://github.com/googleapis/python-cloudbuild/commit/a1e03be14459c19421bc4cc5af90ef4618980761)) +* Add git_file_source and git_repo_source to build_trigger ([a1e03be](https://github.com/googleapis/python-cloudbuild/commit/a1e03be14459c19421bc4cc5af90ef4618980761)) +* Add update_mask to UpdateBuildTriggerRequest proto ([a1e03be](https://github.com/googleapis/python-cloudbuild/commit/a1e03be14459c19421bc4cc5af90ef4618980761)) + ## [3.19.0](https://github.com/googleapis/python-cloudbuild/compare/v3.18.0...v3.19.0) (2023-07-17) diff --git a/google/cloud/devtools/cloudbuild/__init__.py b/google/cloud/devtools/cloudbuild/__init__.py index 48e8ab5..badcdb9 100644 --- a/google/cloud/devtools/cloudbuild/__init__.py +++ b/google/cloud/devtools/cloudbuild/__init__.py @@ -57,7 +57,11 @@ from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import GetBuildRequest 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 GitFileSource +from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import GitHubEnterpriseConfig +from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import GitHubEnterpriseSecrets from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import GitHubEventsConfig +from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import GitRepoSource 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 @@ -135,7 +139,11 @@ "GetBuildRequest", "GetBuildTriggerRequest", "GetWorkerPoolRequest", + "GitFileSource", + "GitHubEnterpriseConfig", + "GitHubEnterpriseSecrets", "GitHubEventsConfig", + "GitRepoSource", "GitSource", "Hash", "InlineSecret", diff --git a/google/cloud/devtools/cloudbuild/gapic_version.py b/google/cloud/devtools/cloudbuild/gapic_version.py index 4e343f6..37656e7 100644 --- a/google/cloud/devtools/cloudbuild/gapic_version.py +++ b/google/cloud/devtools/cloudbuild/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.19.0" # {x-release-please-version} +__version__ = "3.20.0" # {x-release-please-version} diff --git a/google/cloud/devtools/cloudbuild_v1/__init__.py b/google/cloud/devtools/cloudbuild_v1/__init__.py index 5ed2db4..07839e4 100644 --- a/google/cloud/devtools/cloudbuild_v1/__init__.py +++ b/google/cloud/devtools/cloudbuild_v1/__init__.py @@ -45,7 +45,11 @@ from .types.cloudbuild import GetBuildRequest from .types.cloudbuild import GetBuildTriggerRequest from .types.cloudbuild import GetWorkerPoolRequest +from .types.cloudbuild import GitFileSource +from .types.cloudbuild import GitHubEnterpriseConfig +from .types.cloudbuild import GitHubEnterpriseSecrets from .types.cloudbuild import GitHubEventsConfig +from .types.cloudbuild import GitRepoSource from .types.cloudbuild import GitSource from .types.cloudbuild import Hash from .types.cloudbuild import InlineSecret @@ -111,7 +115,11 @@ "GetBuildRequest", "GetBuildTriggerRequest", "GetWorkerPoolRequest", + "GitFileSource", + "GitHubEnterpriseConfig", + "GitHubEnterpriseSecrets", "GitHubEventsConfig", + "GitRepoSource", "GitSource", "Hash", "InlineSecret", diff --git a/google/cloud/devtools/cloudbuild_v1/gapic_version.py b/google/cloud/devtools/cloudbuild_v1/gapic_version.py index 4e343f6..37656e7 100644 --- a/google/cloud/devtools/cloudbuild_v1/gapic_version.py +++ b/google/cloud/devtools/cloudbuild_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.19.0" # {x-release-please-version} +__version__ = "3.20.0" # {x-release-please-version} diff --git a/google/cloud/devtools/cloudbuild_v1/services/cloud_build/async_client.py b/google/cloud/devtools/cloudbuild_v1/services/cloud_build/async_client.py index 953343d..9953ec4 100644 --- a/google/cloud/devtools/cloudbuild_v1/services/cloud_build/async_client.py +++ b/google/cloud/devtools/cloudbuild_v1/services/cloud_build/async_client.py @@ -77,6 +77,12 @@ class CloudBuildAsyncClient: parse_build_trigger_path = staticmethod(CloudBuildClient.parse_build_trigger_path) crypto_key_path = staticmethod(CloudBuildClient.crypto_key_path) parse_crypto_key_path = staticmethod(CloudBuildClient.parse_crypto_key_path) + github_enterprise_config_path = staticmethod( + CloudBuildClient.github_enterprise_config_path + ) + parse_github_enterprise_config_path = staticmethod( + CloudBuildClient.parse_github_enterprise_config_path + ) network_path = staticmethod(CloudBuildClient.network_path) parse_network_path = staticmethod(CloudBuildClient.parse_network_path) repository_path = staticmethod(CloudBuildClient.repository_path) diff --git a/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py b/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py index ad35d7b..fb4e90d 100644 --- a/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py +++ b/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py @@ -246,6 +246,25 @@ def parse_crypto_key_path(path: str) -> Dict[str, str]: ) return m.groupdict() if m else {} + @staticmethod + def github_enterprise_config_path( + project: str, + config: str, + ) -> str: + """Returns a fully-qualified github_enterprise_config string.""" + return "projects/{project}/githubEnterpriseConfigs/{config}".format( + project=project, + config=config, + ) + + @staticmethod + def parse_github_enterprise_config_path(path: str) -> Dict[str, str]: + """Parses a github_enterprise_config path into its component segments.""" + m = re.match( + r"^projects/(?P.+?)/githubEnterpriseConfigs/(?P.+?)$", path + ) + return m.groupdict() if m else {} + @staticmethod def network_path( project: str, diff --git a/google/cloud/devtools/cloudbuild_v1/types/__init__.py b/google/cloud/devtools/cloudbuild_v1/types/__init__.py index 63514f3..546ce17 100644 --- a/google/cloud/devtools/cloudbuild_v1/types/__init__.py +++ b/google/cloud/devtools/cloudbuild_v1/types/__init__.py @@ -38,7 +38,11 @@ GetBuildRequest, GetBuildTriggerRequest, GetWorkerPoolRequest, + GitFileSource, + GitHubEnterpriseConfig, + GitHubEnterpriseSecrets, GitHubEventsConfig, + GitRepoSource, GitSource, Hash, InlineSecret, @@ -103,7 +107,11 @@ "GetBuildRequest", "GetBuildTriggerRequest", "GetWorkerPoolRequest", + "GitFileSource", + "GitHubEnterpriseConfig", + "GitHubEnterpriseSecrets", "GitHubEventsConfig", + "GitRepoSource", "GitSource", "Hash", "InlineSecret", diff --git a/google/cloud/devtools/cloudbuild_v1/types/cloudbuild.py b/google/cloud/devtools/cloudbuild_v1/types/cloudbuild.py index d073dba..1b7c699 100644 --- a/google/cloud/devtools/cloudbuild_v1/types/cloudbuild.py +++ b/google/cloud/devtools/cloudbuild_v1/types/cloudbuild.py @@ -63,6 +63,8 @@ "BuildApproval", "ApprovalConfig", "ApprovalResult", + "GitRepoSource", + "GitFileSource", "BuildTrigger", "RepositoryEventConfig", "GitHubEventsConfig", @@ -79,6 +81,8 @@ "BuildOptions", "ReceiveTriggerWebhookRequest", "ReceiveTriggerWebhookResponse", + "GitHubEnterpriseConfig", + "GitHubEnterpriseSecrets", "WorkerPool", "PrivatePoolV1Config", "CreateWorkerPoolRequest", @@ -534,6 +538,8 @@ class UploadedNpmPackage(proto.Message): class BuildStep(proto.Message): r"""A step in the build pipeline. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: name (str): Required. The name of the container image that will run this @@ -645,6 +651,13 @@ class BuildStep(proto.Message): A shell script to be executed in the step. When script is provided, the user cannot specify the entrypoint or args. + automap_substitutions (bool): + Option to include built-in and custom + substitutions as env variables for this build + step. This option will override the global + option in BuildOption. + + This field is a member of `oneof`_ ``_automap_substitutions``. """ name: str = proto.Field( @@ -720,6 +733,11 @@ class BuildStep(proto.Message): proto.STRING, number=19, ) + automap_substitutions: bool = proto.Field( + proto.BOOL, + number=20, + optional=True, + ) class Volume(proto.Message): @@ -2079,6 +2097,164 @@ class Decision(proto.Enum): ) +class GitRepoSource(proto.Message): + r"""GitRepoSource describes a repo and ref of a code repository. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + uri (str): + The URI of the repo (e.g. https://github.com/user/repo.git). + Either ``uri`` or ``repository`` can be specified and is + required. + repository (str): + The connected repository resource name, in the format + ``projects/*/locations/*/connections/*/repositories/*``. + Either ``uri`` or ``repository`` can be specified and is + required. + + This field is a member of `oneof`_ ``source``. + ref (str): + The branch or tag to use. Must start with + "refs/" (required). + repo_type (google.cloud.devtools.cloudbuild_v1.types.GitFileSource.RepoType): + See RepoType below. + github_enterprise_config (str): + The full resource name of the github enterprise config. + Format: + ``projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}``. + ``projects/{project}/githubEnterpriseConfigs/{id}``. + + This field is a member of `oneof`_ ``enterprise_config``. + """ + + uri: str = proto.Field( + proto.STRING, + number=1, + ) + repository: str = proto.Field( + proto.STRING, + number=6, + oneof="source", + ) + ref: str = proto.Field( + proto.STRING, + number=2, + ) + repo_type: "GitFileSource.RepoType" = proto.Field( + proto.ENUM, + number=3, + enum="GitFileSource.RepoType", + ) + github_enterprise_config: str = proto.Field( + proto.STRING, + number=4, + oneof="enterprise_config", + ) + + +class GitFileSource(proto.Message): + r"""GitFileSource describes a file within a (possibly remote) + code repository. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + path (str): + The path of the file, with the repo root as + the root of the path. + uri (str): + The URI of the repo. + Either uri or repository can be specified. + If unspecified, the repo from which the trigger + invocation originated is assumed to be the repo + from which to read the specified path. + repository (str): + The fully qualified resource name of the + Repos API repository. Either URI or repository + can be specified. If unspecified, the repo from + which the trigger invocation originated is + assumed to be the repo from which to read the + specified path. + + This field is a member of `oneof`_ ``source``. + repo_type (google.cloud.devtools.cloudbuild_v1.types.GitFileSource.RepoType): + See RepoType above. + revision (str): + The branch, tag, arbitrary ref, or SHA + version of the repo to use when resolving the + filename (optional). This field respects the + same syntax/resolution as described here: + + https://git-scm.com/docs/gitrevisions + If unspecified, the revision from which the + trigger invocation originated is assumed to be + the revision from which to read the specified + path. + github_enterprise_config (str): + The full resource name of the github enterprise config. + Format: + ``projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}``. + ``projects/{project}/githubEnterpriseConfigs/{id}``. + + This field is a member of `oneof`_ ``enterprise_config``. + """ + + class RepoType(proto.Enum): + r"""The type of the repo, since it may not be explicit from the ``repo`` + field (e.g from a URL). + + Values: + UNKNOWN (0): + The default, unknown repo type. Don't use it, + instead use one of the other repo types. + CLOUD_SOURCE_REPOSITORIES (1): + A Google Cloud Source Repositories-hosted + repo. + GITHUB (2): + A GitHub-hosted repo not necessarily on + "github.com" (i.e. GitHub Enterprise). + BITBUCKET_SERVER (3): + A Bitbucket Server-hosted repo. + GITLAB (4): + A GitLab-hosted repo. + """ + UNKNOWN = 0 + CLOUD_SOURCE_REPOSITORIES = 1 + GITHUB = 2 + BITBUCKET_SERVER = 3 + GITLAB = 4 + + path: str = proto.Field( + proto.STRING, + number=1, + ) + uri: str = proto.Field( + proto.STRING, + number=2, + ) + repository: str = proto.Field( + proto.STRING, + number=7, + oneof="source", + ) + repo_type: RepoType = proto.Field( + proto.ENUM, + number=3, + enum=RepoType, + ) + revision: str = proto.Field( + proto.STRING, + number=4, + ) + github_enterprise_config: str = proto.Field( + proto.STRING, + number=5, + oneof="enterprise_config", + ) + + class BuildTrigger(proto.Message): r"""Configuration for an automated build in response to source repository changes. @@ -2105,10 +2281,12 @@ class BuildTrigger(proto.Message): User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + + They must contain only alphanumeric characters - and dashes. + They can be 1-64 characters long. + and dashes. + + They can be 1-64 characters long. + They must begin and end with an alphanumeric - character. + character. tags (MutableSequence[str]): Tags for annotation of a ``BuildTrigger`` trigger_template (google.cloud.devtools.cloudbuild_v1.types.RepoSource): @@ -2136,6 +2314,7 @@ class BuildTrigger(proto.Message): autodetect (bool): Autodetect build configuration. The following precedence is used (case insensitive): + 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json @@ -2153,6 +2332,11 @@ class BuildTrigger(proto.Message): Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml). + This field is a member of `oneof`_ ``build_template``. + git_file_source (google.cloud.devtools.cloudbuild_v1.types.GitFileSource): + The file source describing the local or + remote Build template. + This field is a member of `oneof`_ ``build_template``. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Time when the trigger was @@ -2188,6 +2372,14 @@ class BuildTrigger(proto.Message): filter (str): Optional. A Common Expression Language string. + source_to_build (google.cloud.devtools.cloudbuild_v1.types.GitRepoSource): + The repo and ref of the repository from which + to build. This field is used only for those + triggers that do not respond to SCM events. + Triggers that respond to such events build + source at whatever commit caused the event. + This field is currently only used by Webhook, + Pub/Sub, Manual, and Cron triggers. service_account (str): The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, @@ -2258,6 +2450,12 @@ class BuildTrigger(proto.Message): number=8, oneof="build_template", ) + git_file_source: "GitFileSource" = proto.Field( + proto.MESSAGE, + number=24, + oneof="build_template", + message="GitFileSource", + ) create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=5, @@ -2284,6 +2482,11 @@ class BuildTrigger(proto.Message): proto.STRING, number=30, ) + source_to_build: "GitRepoSource" = proto.Field( + proto.MESSAGE, + number=26, + message="GitRepoSource", + ) service_account: str = proto.Field( proto.STRING, number=33, @@ -2806,6 +3009,11 @@ class UpdateBuildTriggerRequest(proto.Message): Required. ID of the ``BuildTrigger`` to update. trigger (google.cloud.devtools.cloudbuild_v1.types.BuildTrigger): Required. ``BuildTrigger`` to update. + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Update mask for the resource. If this is set, + the server will only update the fields specified + in the field mask. Otherwise, a full update of + the mutable resource fields will be performed. """ project_id: str = proto.Field( @@ -2821,6 +3029,11 @@ class UpdateBuildTriggerRequest(proto.Message): number=3, message="BuildTrigger", ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=5, + message=field_mask_pb2.FieldMask, + ) class BuildOptions(proto.Message): @@ -2856,6 +3069,10 @@ class BuildOptions(proto.Message): NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file. + automap_substitutions (bool): + Option to include built-in and custom + substitutions as env variables for all build + steps. log_streaming_option (google.cloud.devtools.cloudbuild_v1.types.BuildOptions.LogStreamingOption): Option to define build log streaming behavior to Cloud Storage. @@ -3082,6 +3299,10 @@ class PoolOption(proto.Message): proto.BOOL, number=17, ) + automap_substitutions: bool = proto.Field( + proto.BOOL, + number=22, + ) log_streaming_option: LogStreamingOption = proto.Field( proto.ENUM, number=5, @@ -3172,6 +3393,125 @@ class ReceiveTriggerWebhookResponse(proto.Message): """ +class GitHubEnterpriseConfig(proto.Message): + r""" + + Attributes: + name (str): + Optional. The full resource name for the + GitHubEnterpriseConfig For example: + "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}". + host_url (str): + The URL of the github enterprise host the + configuration is for. + app_id (int): + Required. The GitHub app id of the Cloud + Build app on the GitHub Enterprise server. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the installation was + associated with the project. + webhook_key (str): + The key that should be attached to webhook + calls to the ReceiveWebhook endpoint. + peered_network (str): + Optional. The network to be used when reaching out to the + GitHub Enterprise server. The VPC network must be enabled + for private service connection. This should be set if the + GitHub Enterprise server is hosted on-premises and not + reachable by public internet. If this field is left empty, + no network peering will occur and calls to the GitHub + Enterprise server will be made over the public internet. + Must be in the format + ``projects/{project}/global/networks/{network}``, where + {project} is a project number or id and {network} is the + name of a VPC network in the project. + secrets (google.cloud.devtools.cloudbuild_v1.types.GitHubEnterpriseSecrets): + Names of secrets in Secret Manager. + display_name (str): + Name to display for this config. + ssl_ca (str): + Optional. SSL certificate to use for requests + to GitHub Enterprise. + """ + + name: str = proto.Field( + proto.STRING, + number=7, + ) + host_url: str = proto.Field( + proto.STRING, + number=3, + ) + app_id: int = proto.Field( + proto.INT64, + number=4, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=6, + message=timestamp_pb2.Timestamp, + ) + webhook_key: str = proto.Field( + proto.STRING, + number=8, + ) + peered_network: str = proto.Field( + proto.STRING, + number=9, + ) + secrets: "GitHubEnterpriseSecrets" = proto.Field( + proto.MESSAGE, + number=10, + message="GitHubEnterpriseSecrets", + ) + display_name: str = proto.Field( + proto.STRING, + number=11, + ) + ssl_ca: str = proto.Field( + proto.STRING, + number=12, + ) + + +class GitHubEnterpriseSecrets(proto.Message): + r"""GitHubEnterpriseSecrets represents the names of all necessary + secrets in Secret Manager for a GitHub Enterprise server. Format + is: projects//secrets/. + + Attributes: + private_key_version_name (str): + The resource name for the private key secret + version. + webhook_secret_version_name (str): + The resource name for the webhook secret + secret version in Secret Manager. + oauth_secret_version_name (str): + The resource name for the OAuth secret secret + version in Secret Manager. + oauth_client_id_version_name (str): + The resource name for the OAuth client ID + secret version in Secret Manager. + """ + + private_key_version_name: str = proto.Field( + proto.STRING, + number=5, + ) + webhook_secret_version_name: str = proto.Field( + proto.STRING, + number=6, + ) + oauth_secret_version_name: str = proto.Field( + proto.STRING, + number=7, + ) + oauth_client_id_version_name: str = proto.Field( + proto.STRING, + number=8, + ) + + class WorkerPool(proto.Message): r"""Configuration for a ``WorkerPool``. diff --git a/google/cloud/devtools/cloudbuild_v2/gapic_version.py b/google/cloud/devtools/cloudbuild_v2/gapic_version.py index 4e343f6..37656e7 100644 --- a/google/cloud/devtools/cloudbuild_v2/gapic_version.py +++ b/google/cloud/devtools/cloudbuild_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.19.0" # {x-release-please-version} +__version__ = "3.20.0" # {x-release-please-version} diff --git a/google/cloud/devtools/cloudbuild_v2/types/repositories.py b/google/cloud/devtools/cloudbuild_v2/types/repositories.py index 975e61b..62b41a0 100644 --- a/google/cloud/devtools/cloudbuild_v2/types/repositories.py +++ b/google/cloud/devtools/cloudbuild_v2/types/repositories.py @@ -475,6 +475,7 @@ class ServiceDirectoryConfig(proto.Message): service (str): Required. The Service Directory service name. Format: + projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}. """ diff --git a/noxfile.py b/noxfile.py index 5ff5497..2b3b1bf 100644 --- a/noxfile.py +++ b/noxfile.py @@ -25,6 +25,7 @@ import nox +FLAKE8_VERSION = "flake8==6.1.0" BLACK_VERSION = "black==22.3.0" ISORT_VERSION = "isort==5.10.1" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] @@ -81,7 +82,7 @@ def lint(session): Returns a failure if the linters find linting errors or sufficiently serious code quality issues. """ - session.install("flake8", BLACK_VERSION) + session.install(FLAKE8_VERSION, BLACK_VERSION) session.run( "black", "--check", diff --git a/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v1.json b/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v1.json index 89703d2..0857ed9 100644 --- a/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v1.json +++ b/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-build", - "version": "3.19.0" + "version": "3.20.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v2.json b/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v2.json index 6995137..7ae3efe 100644 --- a/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v2.json +++ b/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-build", - "version": "3.19.0" + "version": "3.20.0" }, "snippets": [ { diff --git a/scripts/fixup_cloudbuild_v1_keywords.py b/scripts/fixup_cloudbuild_v1_keywords.py index 78aabad..92866fb 100644 --- a/scripts/fixup_cloudbuild_v1_keywords.py +++ b/scripts/fixup_cloudbuild_v1_keywords.py @@ -55,7 +55,7 @@ class cloudbuildCallTransformer(cst.CSTTransformer): 'receive_trigger_webhook': ('name', 'body', 'project_id', 'trigger', 'secret', ), 'retry_build': ('project_id', 'id', 'name', ), 'run_build_trigger': ('project_id', 'trigger_id', 'name', 'source', ), - 'update_build_trigger': ('project_id', 'trigger_id', 'trigger', ), + 'update_build_trigger': ('project_id', 'trigger_id', 'trigger', 'update_mask', ), 'update_worker_pool': ('worker_pool', 'update_mask', 'validate_only', ), } diff --git a/tests/unit/gapic/cloudbuild_v1/test_cloud_build.py b/tests/unit/gapic/cloudbuild_v1/test_cloud_build.py index f5fb0f8..2570d63 100644 --- a/tests/unit/gapic/cloudbuild_v1/test_cloud_build.py +++ b/tests/unit/gapic/cloudbuild_v1/test_cloud_build.py @@ -5294,6 +5294,7 @@ def test_create_build_rest(request_type): "exit_code": 948, "allow_exit_codes": [1702, 1703], "script": "script_value", + "automap_substitutions": True, } ], "results": { @@ -5374,6 +5375,7 @@ def test_create_build_rest(request_type): "disk_size_gb": 1261, "substitution_option": 1, "dynamic_substitutions": True, + "automap_substitutions": True, "log_streaming_option": 1, "worker_pool": "worker_pool_value", "pool": {"name": "name_value"}, @@ -5644,6 +5646,7 @@ def test_create_build_rest_bad_request( "exit_code": 948, "allow_exit_codes": [1702, 1703], "script": "script_value", + "automap_substitutions": True, } ], "results": { @@ -5724,6 +5727,7 @@ def test_create_build_rest_bad_request( "disk_size_gb": 1261, "substitution_option": 1, "dynamic_substitutions": True, + "automap_substitutions": True, "log_streaming_option": 1, "worker_pool": "worker_pool_value", "pool": {"name": "name_value"}, @@ -7403,6 +7407,7 @@ def test_create_build_trigger_rest(request_type): "exit_code": 948, "allow_exit_codes": [1702, 1703], "script": "script_value", + "automap_substitutions": True, } ], "results": { @@ -7486,6 +7491,7 @@ def test_create_build_trigger_rest(request_type): "disk_size_gb": 1261, "substitution_option": 1, "dynamic_substitutions": True, + "automap_substitutions": True, "log_streaming_option": 1, "worker_pool": "worker_pool_value", "pool": {"name": "name_value"}, @@ -7522,12 +7528,27 @@ def test_create_build_trigger_rest(request_type): "failure_info": {"type_": 1, "detail": "detail_value"}, }, "filename": "filename_value", + "git_file_source": { + "path": "path_value", + "uri": "uri_value", + "repository": "repository_value", + "repo_type": 1, + "revision": "revision_value", + "github_enterprise_config": "github_enterprise_config_value", + }, "create_time": {}, "disabled": True, "substitutions": {}, "ignored_files": ["ignored_files_value1", "ignored_files_value2"], "included_files": ["included_files_value1", "included_files_value2"], "filter": "filter_value", + "source_to_build": { + "uri": "uri_value", + "repository": "repository_value", + "ref": "ref_value", + "repo_type": 1, + "github_enterprise_config": "github_enterprise_config_value", + }, "service_account": "service_account_value", "repository_event_config": { "repository": "repository_value", @@ -7828,6 +7849,7 @@ def test_create_build_trigger_rest_bad_request( "exit_code": 948, "allow_exit_codes": [1702, 1703], "script": "script_value", + "automap_substitutions": True, } ], "results": { @@ -7911,6 +7933,7 @@ def test_create_build_trigger_rest_bad_request( "disk_size_gb": 1261, "substitution_option": 1, "dynamic_substitutions": True, + "automap_substitutions": True, "log_streaming_option": 1, "worker_pool": "worker_pool_value", "pool": {"name": "name_value"}, @@ -7947,12 +7970,27 @@ def test_create_build_trigger_rest_bad_request( "failure_info": {"type_": 1, "detail": "detail_value"}, }, "filename": "filename_value", + "git_file_source": { + "path": "path_value", + "uri": "uri_value", + "repository": "repository_value", + "repo_type": 1, + "revision": "revision_value", + "github_enterprise_config": "github_enterprise_config_value", + }, "create_time": {}, "disabled": True, "substitutions": {}, "ignored_files": ["ignored_files_value1", "ignored_files_value2"], "included_files": ["included_files_value1", "included_files_value2"], "filter": "filter_value", + "source_to_build": { + "uri": "uri_value", + "repository": "repository_value", + "ref": "ref_value", + "repo_type": 1, + "github_enterprise_config": "github_enterprise_config_value", + }, "service_account": "service_account_value", "repository_event_config": { "repository": "repository_value", @@ -9049,6 +9087,7 @@ def test_update_build_trigger_rest(request_type): "exit_code": 948, "allow_exit_codes": [1702, 1703], "script": "script_value", + "automap_substitutions": True, } ], "results": { @@ -9132,6 +9171,7 @@ def test_update_build_trigger_rest(request_type): "disk_size_gb": 1261, "substitution_option": 1, "dynamic_substitutions": True, + "automap_substitutions": True, "log_streaming_option": 1, "worker_pool": "worker_pool_value", "pool": {"name": "name_value"}, @@ -9168,12 +9208,27 @@ def test_update_build_trigger_rest(request_type): "failure_info": {"type_": 1, "detail": "detail_value"}, }, "filename": "filename_value", + "git_file_source": { + "path": "path_value", + "uri": "uri_value", + "repository": "repository_value", + "repo_type": 1, + "revision": "revision_value", + "github_enterprise_config": "github_enterprise_config_value", + }, "create_time": {}, "disabled": True, "substitutions": {}, "ignored_files": ["ignored_files_value1", "ignored_files_value2"], "included_files": ["included_files_value1", "included_files_value2"], "filter": "filter_value", + "source_to_build": { + "uri": "uri_value", + "repository": "repository_value", + "ref": "ref_value", + "repo_type": 1, + "github_enterprise_config": "github_enterprise_config_value", + }, "service_account": "service_account_value", "repository_event_config": { "repository": "repository_value", @@ -9258,6 +9313,8 @@ def test_update_build_trigger_rest_required_fields( unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() ).update_build_trigger._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("update_mask",)) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -9314,7 +9371,7 @@ def test_update_build_trigger_rest_unset_required_fields(): unset_fields = transport.update_build_trigger._get_unset_required_fields({}) assert set(unset_fields) == ( - set(()) + set(("updateMask",)) & set( ( "projectId", @@ -9477,6 +9534,7 @@ def test_update_build_trigger_rest_bad_request( "exit_code": 948, "allow_exit_codes": [1702, 1703], "script": "script_value", + "automap_substitutions": True, } ], "results": { @@ -9560,6 +9618,7 @@ def test_update_build_trigger_rest_bad_request( "disk_size_gb": 1261, "substitution_option": 1, "dynamic_substitutions": True, + "automap_substitutions": True, "log_streaming_option": 1, "worker_pool": "worker_pool_value", "pool": {"name": "name_value"}, @@ -9596,12 +9655,27 @@ def test_update_build_trigger_rest_bad_request( "failure_info": {"type_": 1, "detail": "detail_value"}, }, "filename": "filename_value", + "git_file_source": { + "path": "path_value", + "uri": "uri_value", + "repository": "repository_value", + "repo_type": 1, + "revision": "revision_value", + "github_enterprise_config": "github_enterprise_config_value", + }, "create_time": {}, "disabled": True, "substitutions": {}, "ignored_files": ["ignored_files_value1", "ignored_files_value2"], "included_files": ["included_files_value1", "included_files_value2"], "filter": "filter_value", + "source_to_build": { + "uri": "uri_value", + "repository": "repository_value", + "ref": "ref_value", + "repo_type": 1, + "github_enterprise_config": "github_enterprise_config_value", + }, "service_account": "service_account_value", "repository_event_config": { "repository": "repository_value", @@ -12430,9 +12504,32 @@ def test_parse_crypto_key_path(): assert expected == actual -def test_network_path(): +def test_github_enterprise_config_path(): project = "oyster" - network = "nudibranch" + config = "nudibranch" + expected = "projects/{project}/githubEnterpriseConfigs/{config}".format( + project=project, + config=config, + ) + actual = CloudBuildClient.github_enterprise_config_path(project, config) + assert expected == actual + + +def test_parse_github_enterprise_config_path(): + expected = { + "project": "cuttlefish", + "config": "mussel", + } + path = CloudBuildClient.github_enterprise_config_path(**expected) + + # Check that the path construction is reversible. + actual = CloudBuildClient.parse_github_enterprise_config_path(path) + assert expected == actual + + +def test_network_path(): + project = "winkle" + network = "nautilus" expected = "projects/{project}/global/networks/{network}".format( project=project, network=network, @@ -12443,8 +12540,8 @@ def test_network_path(): def test_parse_network_path(): expected = { - "project": "cuttlefish", - "network": "mussel", + "project": "scallop", + "network": "abalone", } path = CloudBuildClient.network_path(**expected) @@ -12454,10 +12551,10 @@ def test_parse_network_path(): def test_repository_path(): - project = "winkle" - location = "nautilus" - connection = "scallop" - repository = "abalone" + project = "squid" + location = "clam" + connection = "whelk" + repository = "octopus" expected = "projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}".format( project=project, location=location, @@ -12470,10 +12567,10 @@ def test_repository_path(): def test_parse_repository_path(): expected = { - "project": "squid", - "location": "clam", - "connection": "whelk", - "repository": "octopus", + "project": "oyster", + "location": "nudibranch", + "connection": "cuttlefish", + "repository": "mussel", } path = CloudBuildClient.repository_path(**expected) @@ -12483,9 +12580,9 @@ def test_parse_repository_path(): def test_secret_version_path(): - project = "oyster" - secret = "nudibranch" - version = "cuttlefish" + project = "winkle" + secret = "nautilus" + version = "scallop" expected = "projects/{project}/secrets/{secret}/versions/{version}".format( project=project, secret=secret, @@ -12497,9 +12594,9 @@ def test_secret_version_path(): def test_parse_secret_version_path(): expected = { - "project": "mussel", - "secret": "winkle", - "version": "nautilus", + "project": "abalone", + "secret": "squid", + "version": "clam", } path = CloudBuildClient.secret_version_path(**expected) @@ -12509,8 +12606,8 @@ def test_parse_secret_version_path(): def test_service_account_path(): - project = "scallop" - service_account = "abalone" + project = "whelk" + service_account = "octopus" expected = "projects/{project}/serviceAccounts/{service_account}".format( project=project, service_account=service_account, @@ -12521,8 +12618,8 @@ def test_service_account_path(): def test_parse_service_account_path(): expected = { - "project": "squid", - "service_account": "clam", + "project": "oyster", + "service_account": "nudibranch", } path = CloudBuildClient.service_account_path(**expected) @@ -12532,8 +12629,8 @@ def test_parse_service_account_path(): def test_subscription_path(): - project = "whelk" - subscription = "octopus" + project = "cuttlefish" + subscription = "mussel" expected = "projects/{project}/subscriptions/{subscription}".format( project=project, subscription=subscription, @@ -12544,8 +12641,8 @@ def test_subscription_path(): def test_parse_subscription_path(): expected = { - "project": "oyster", - "subscription": "nudibranch", + "project": "winkle", + "subscription": "nautilus", } path = CloudBuildClient.subscription_path(**expected) @@ -12555,8 +12652,8 @@ def test_parse_subscription_path(): def test_topic_path(): - project = "cuttlefish" - topic = "mussel" + project = "scallop" + topic = "abalone" expected = "projects/{project}/topics/{topic}".format( project=project, topic=topic, @@ -12567,8 +12664,8 @@ def test_topic_path(): def test_parse_topic_path(): expected = { - "project": "winkle", - "topic": "nautilus", + "project": "squid", + "topic": "clam", } path = CloudBuildClient.topic_path(**expected) @@ -12578,9 +12675,9 @@ def test_parse_topic_path(): def test_worker_pool_path(): - project = "scallop" - location = "abalone" - worker_pool = "squid" + project = "whelk" + location = "octopus" + worker_pool = "oyster" expected = ( "projects/{project}/locations/{location}/workerPools/{worker_pool}".format( project=project, @@ -12594,9 +12691,9 @@ def test_worker_pool_path(): def test_parse_worker_pool_path(): expected = { - "project": "clam", - "location": "whelk", - "worker_pool": "octopus", + "project": "nudibranch", + "location": "cuttlefish", + "worker_pool": "mussel", } path = CloudBuildClient.worker_pool_path(**expected) @@ -12606,7 +12703,7 @@ def test_parse_worker_pool_path(): def test_common_billing_account_path(): - billing_account = "oyster" + billing_account = "winkle" expected = "billingAccounts/{billing_account}".format( billing_account=billing_account, ) @@ -12616,7 +12713,7 @@ def test_common_billing_account_path(): def test_parse_common_billing_account_path(): expected = { - "billing_account": "nudibranch", + "billing_account": "nautilus", } path = CloudBuildClient.common_billing_account_path(**expected) @@ -12626,7 +12723,7 @@ def test_parse_common_billing_account_path(): def test_common_folder_path(): - folder = "cuttlefish" + folder = "scallop" expected = "folders/{folder}".format( folder=folder, ) @@ -12636,7 +12733,7 @@ def test_common_folder_path(): def test_parse_common_folder_path(): expected = { - "folder": "mussel", + "folder": "abalone", } path = CloudBuildClient.common_folder_path(**expected) @@ -12646,7 +12743,7 @@ def test_parse_common_folder_path(): def test_common_organization_path(): - organization = "winkle" + organization = "squid" expected = "organizations/{organization}".format( organization=organization, ) @@ -12656,7 +12753,7 @@ def test_common_organization_path(): def test_parse_common_organization_path(): expected = { - "organization": "nautilus", + "organization": "clam", } path = CloudBuildClient.common_organization_path(**expected) @@ -12666,7 +12763,7 @@ def test_parse_common_organization_path(): def test_common_project_path(): - project = "scallop" + project = "whelk" expected = "projects/{project}".format( project=project, ) @@ -12676,7 +12773,7 @@ def test_common_project_path(): def test_parse_common_project_path(): expected = { - "project": "abalone", + "project": "octopus", } path = CloudBuildClient.common_project_path(**expected) @@ -12686,8 +12783,8 @@ def test_parse_common_project_path(): def test_common_location_path(): - project = "squid" - location = "clam" + project = "oyster" + location = "nudibranch" expected = "projects/{project}/locations/{location}".format( project=project, location=location, @@ -12698,8 +12795,8 @@ def test_common_location_path(): def test_parse_common_location_path(): expected = { - "project": "whelk", - "location": "octopus", + "project": "cuttlefish", + "location": "mussel", } path = CloudBuildClient.common_location_path(**expected)