diff --git a/packages/google-cloud-deploy/.flake8 b/packages/google-cloud-deploy/.flake8 index 2e438749863d..87f6e408c47d 100644 --- a/packages/google-cloud-deploy/.flake8 +++ b/packages/google-cloud-deploy/.flake8 @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-deploy/CONTRIBUTING.rst b/packages/google-cloud-deploy/CONTRIBUTING.rst index 1509489dad6b..7471335c9fa2 100644 --- a/packages/google-cloud-deploy/CONTRIBUTING.rst +++ b/packages/google-cloud-deploy/CONTRIBUTING.rst @@ -236,7 +236,7 @@ We support: Supported versions can be found in our ``noxfile.py`` `config`_. -.. _config: https://github.com/googleapis/google-cloud-python/blob/main/noxfile.py +.. _config: https://github.com/googleapis/google-cloud-python/blob/main/packages/google-cloud-deploy/noxfile.py ********** diff --git a/packages/google-cloud-deploy/MANIFEST.in b/packages/google-cloud-deploy/MANIFEST.in index e783f4c6209b..e0a66705318e 100644 --- a/packages/google-cloud-deploy/MANIFEST.in +++ b/packages/google-cloud-deploy/MANIFEST.in @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-deploy/README.rst b/packages/google-cloud-deploy/README.rst index 7ec9d7e8eeab..7a0cc2c64eaf 100644 --- a/packages/google-cloud-deploy/README.rst +++ b/packages/google-cloud-deploy/README.rst @@ -36,21 +36,24 @@ In order to use this library, you first need to go through the following steps: Installation ~~~~~~~~~~~~ -Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to -create isolated Python environments. The basic problem it addresses is one of -dependencies and versions, and indirectly permissions. +Install this library in a virtual environment using `venv`_. `venv`_ is a tool that +creates isolated Python environments. These isolated environments can have separate +versions of Python packages, which allows you to isolate one project's dependencies +from the dependencies of other projects. -With `virtualenv`_, it's possible to install this library without needing system +With `venv`_, it's possible to install this library without needing system install permissions, and without clashing with the installed system dependencies. -.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/ +.. _`venv`: https://docs.python.org/3/library/venv.html Code samples and snippets ~~~~~~~~~~~~~~~~~~~~~~~~~ -Code samples and snippets live in the `samples/` folder. +Code samples and snippets live in the `samples/`_ folder. + +.. _samples/: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-deploy/samples Supported Python Versions @@ -77,10 +80,9 @@ Mac/Linux .. code-block:: console - pip install virtualenv - virtualenv + python3 -m venv source /bin/activate - /bin/pip install google-cloud-deploy + pip install google-cloud-deploy Windows @@ -88,10 +90,9 @@ Windows .. code-block:: console - pip install virtualenv - virtualenv - \Scripts\activate - \Scripts\pip.exe install google-cloud-deploy + py -m venv + .\\Scripts\activate + pip install google-cloud-deploy Next Steps ~~~~~~~~~~ diff --git a/packages/google-cloud-deploy/docs/conf.py b/packages/google-cloud-deploy/docs/conf.py index ced3c585cc09..1fe96641d838 100644 --- a/packages/google-cloud-deploy/docs/conf.py +++ b/packages/google-cloud-deploy/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2021 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-deploy/google/cloud/deploy/__init__.py b/packages/google-cloud-deploy/google/cloud/deploy/__init__.py index 8eb3f1af5208..96bc8c48cce9 100644 --- a/packages/google-cloud-deploy/google/cloud/deploy/__init__.py +++ b/packages/google-cloud-deploy/google/cloud/deploy/__init__.py @@ -89,6 +89,12 @@ Phase, PipelineCondition, PipelineReadyCondition, + Postdeploy, + PostdeployJob, + PostdeployJobRun, + Predeploy, + PredeployJob, + PredeployJobRun, PrivatePool, Release, RenderMetadata, @@ -200,6 +206,12 @@ "Phase", "PipelineCondition", "PipelineReadyCondition", + "Postdeploy", + "PostdeployJob", + "PostdeployJobRun", + "Predeploy", + "PredeployJob", + "PredeployJobRun", "PrivatePool", "Release", "RenderMetadata", diff --git a/packages/google-cloud-deploy/google/cloud/deploy/gapic_version.py b/packages/google-cloud-deploy/google/cloud/deploy/gapic_version.py index e03808f0e56f..360a0d13ebdd 100644 --- a/packages/google-cloud-deploy/google/cloud/deploy/gapic_version.py +++ b/packages/google-cloud-deploy/google/cloud/deploy/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.11.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-deploy/google/cloud/deploy_v1/__init__.py b/packages/google-cloud-deploy/google/cloud/deploy_v1/__init__.py index 4da70e7d1bd1..85fa6001e21b 100644 --- a/packages/google-cloud-deploy/google/cloud/deploy_v1/__init__.py +++ b/packages/google-cloud-deploy/google/cloud/deploy_v1/__init__.py @@ -86,6 +86,12 @@ Phase, PipelineCondition, PipelineReadyCondition, + Postdeploy, + PostdeployJob, + PostdeployJobRun, + Predeploy, + PredeployJob, + PredeployJobRun, PrivatePool, Release, RenderMetadata, @@ -191,6 +197,12 @@ "Phase", "PipelineCondition", "PipelineReadyCondition", + "Postdeploy", + "PostdeployJob", + "PostdeployJobRun", + "Predeploy", + "PredeployJob", + "PredeployJobRun", "PrivatePool", "Release", "ReleaseNotificationEvent", diff --git a/packages/google-cloud-deploy/google/cloud/deploy_v1/gapic_version.py b/packages/google-cloud-deploy/google/cloud/deploy_v1/gapic_version.py index e03808f0e56f..360a0d13ebdd 100644 --- a/packages/google-cloud-deploy/google/cloud/deploy_v1/gapic_version.py +++ b/packages/google-cloud-deploy/google/cloud/deploy_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.11.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-deploy/google/cloud/deploy_v1/types/__init__.py b/packages/google-cloud-deploy/google/cloud/deploy_v1/types/__init__.py index b47bd4673b51..077cf1b04d17 100644 --- a/packages/google-cloud-deploy/google/cloud/deploy_v1/types/__init__.py +++ b/packages/google-cloud-deploy/google/cloud/deploy_v1/types/__init__.py @@ -80,6 +80,12 @@ Phase, PipelineCondition, PipelineReadyCondition, + Postdeploy, + PostdeployJob, + PostdeployJobRun, + Predeploy, + PredeployJob, + PredeployJobRun, PrivatePool, Release, RenderMetadata, @@ -178,6 +184,12 @@ "Phase", "PipelineCondition", "PipelineReadyCondition", + "Postdeploy", + "PostdeployJob", + "PostdeployJobRun", + "Predeploy", + "PredeployJob", + "PredeployJobRun", "PrivatePool", "Release", "RenderMetadata", diff --git a/packages/google-cloud-deploy/google/cloud/deploy_v1/types/cloud_deploy.py b/packages/google-cloud-deploy/google/cloud/deploy_v1/types/cloud_deploy.py index 85349e06ef25..23c441d44dda 100644 --- a/packages/google-cloud-deploy/google/cloud/deploy_v1/types/cloud_deploy.py +++ b/packages/google-cloud-deploy/google/cloud/deploy_v1/types/cloud_deploy.py @@ -32,6 +32,8 @@ "Stage", "DeployParameters", "Strategy", + "Predeploy", + "Postdeploy", "Standard", "Canary", "CanaryDeployment", @@ -83,6 +85,8 @@ "Job", "DeployJob", "VerifyJob", + "PredeployJob", + "PostdeployJob", "CreateChildRolloutJob", "AdvanceChildRolloutJob", "ListRolloutsRequest", @@ -105,6 +109,8 @@ "JobRun", "DeployJobRun", "VerifyJobRun", + "PredeployJobRun", + "PostdeployJobRun", "CreateChildRolloutJobRun", "AdvanceChildRolloutJobRun", "ListJobRunsRequest", @@ -379,18 +385,70 @@ class Strategy(proto.Message): ) +class Predeploy(proto.Message): + r"""Predeploy contains the predeploy job configuration + information. + + Attributes: + actions (MutableSequence[str]): + Optional. A sequence of skaffold custom + actions to invoke during execution of the + predeploy job. + """ + + actions: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + + +class Postdeploy(proto.Message): + r"""Postdeploy contains the postdeploy job configuration + information. + + Attributes: + actions (MutableSequence[str]): + Optional. A sequence of skaffold custom + actions to invoke during execution of the + postdeploy job. + """ + + actions: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + + class Standard(proto.Message): r"""Standard represents the standard deployment strategy. Attributes: verify (bool): Whether to verify a deployment. + predeploy (google.cloud.deploy_v1.types.Predeploy): + Optional. Configuration for the predeploy + job. If this is not configured, predeploy job + will not be present. + postdeploy (google.cloud.deploy_v1.types.Postdeploy): + Optional. Configuration for the postdeploy + job. If this is not configured, postdeploy job + will not be present. """ verify: bool = proto.Field( proto.BOOL, number=1, ) + predeploy: "Predeploy" = proto.Field( + proto.MESSAGE, + number=2, + message="Predeploy", + ) + postdeploy: "Postdeploy" = proto.Field( + proto.MESSAGE, + number=3, + message="Postdeploy", + ) class Canary(proto.Message): @@ -455,6 +513,14 @@ class CanaryDeployment(proto.Message): verify (bool): Whether to run verify tests after each percentage deployment. + predeploy (google.cloud.deploy_v1.types.Predeploy): + Optional. Configuration for the predeploy job + of the first phase. If this is not configured, + predeploy job will not be present. + postdeploy (google.cloud.deploy_v1.types.Postdeploy): + Optional. Configuration for the postdeploy + job of the last phase. If this is not + configured, postdeploy job will not be present. """ percentages: MutableSequence[int] = proto.RepeatedField( @@ -465,6 +531,16 @@ class CanaryDeployment(proto.Message): proto.BOOL, number=2, ) + predeploy: "Predeploy" = proto.Field( + proto.MESSAGE, + number=3, + message="Predeploy", + ) + postdeploy: "Postdeploy" = proto.Field( + proto.MESSAGE, + number=4, + message="Postdeploy", + ) class CustomCanaryDeployment(proto.Message): @@ -499,6 +575,16 @@ class PhaseConfig(proto.Message): verify (bool): Whether to run verify tests after the deployment. + predeploy (google.cloud.deploy_v1.types.Predeploy): + Optional. Configuration for the predeploy job + of this phase. If this is not configured, + predeploy job will not be present for this + phase. + postdeploy (google.cloud.deploy_v1.types.Postdeploy): + Optional. Configuration for the postdeploy + job of this phase. If this is not configured, + postdeploy job will not be present for this + phase. """ phase_id: str = proto.Field( @@ -517,6 +603,16 @@ class PhaseConfig(proto.Message): proto.BOOL, number=4, ) + predeploy: "Predeploy" = proto.Field( + proto.MESSAGE, + number=5, + message="Predeploy", + ) + postdeploy: "Postdeploy" = proto.Field( + proto.MESSAGE, + number=6, + message="Postdeploy", + ) phase_configs: MutableSequence[PhaseConfig] = proto.RepeatedField( proto.MESSAGE, @@ -1328,11 +1424,17 @@ class ExecutionEnvironmentUsage(proto.Enum): Use for deploying and deployment hooks. VERIFY (3): Use for deployment verification. + PREDEPLOY (4): + Use for predeploy job execution. + POSTDEPLOY (5): + Use for postdeploy job execution. """ EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED = 0 RENDER = 1 DEPLOY = 2 VERIFY = 3 + PREDEPLOY = 4 + POSTDEPLOY = 5 usages: MutableSequence[ExecutionEnvironmentUsage] = proto.RepeatedField( proto.ENUM, @@ -1960,18 +2062,24 @@ class FailureCause(proto.Enum): Cloud Build is not available, either because it is not enabled or because Cloud Deploy has insufficient permissions. See `required - permission `__. + permission `__. EXECUTION_FAILED (2): The render operation did not complete successfully; check Cloud Build logs. CLOUD_BUILD_REQUEST_FAILED (3): Cloud Build failed to fulfill Cloud Deploy's request. See failure_message for additional details. + CUSTOM_ACTION_NOT_FOUND (5): + The render operation did not complete successfully because + the custom action required for predeploy or postdeploy was + not found in the skaffold configuration. See failure_message + for additional details. """ FAILURE_CAUSE_UNSPECIFIED = 0 CLOUD_BUILD_UNAVAILABLE = 1 EXECUTION_FAILED = 2 CLOUD_BUILD_REQUEST_FAILED = 3 + CUSTOM_ACTION_NOT_FOUND = 5 rendering_build: str = proto.Field( proto.STRING, @@ -2654,7 +2762,7 @@ class FailureCause(proto.Enum): Cloud Build is not available, either because it is not enabled or because Cloud Deploy has insufficient permissions. See `required - permission `__. + permission `__. EXECUTION_FAILED (2): The deploy operation did not complete successfully; check Cloud Build logs. @@ -2932,6 +3040,14 @@ class DeploymentJobs(proto.Message): verify_job (google.cloud.deploy_v1.types.Job): Output only. The verify Job. Runs after a deploy if the deploy succeeds. + predeploy_job (google.cloud.deploy_v1.types.Job): + Output only. The predeploy Job. This is the + predeploy job in the phase. This is the first + job of the phase. + postdeploy_job (google.cloud.deploy_v1.types.Job): + Output only. The postdeploy Job. This is the + postdeploy job in the phase. This is the last + job of the phase. """ deploy_job: "Job" = proto.Field( @@ -2944,6 +3060,16 @@ class DeploymentJobs(proto.Message): number=2, message="Job", ) + predeploy_job: "Job" = proto.Field( + proto.MESSAGE, + number=3, + message="Job", + ) + postdeploy_job: "Job" = proto.Field( + proto.MESSAGE, + number=4, + message="Job", + ) class ChildRolloutJobs(proto.Message): @@ -2996,6 +3122,14 @@ class Job(proto.Message): verify_job (google.cloud.deploy_v1.types.VerifyJob): Output only. A verify Job. + This field is a member of `oneof`_ ``job_type``. + predeploy_job (google.cloud.deploy_v1.types.PredeployJob): + Output only. A predeploy Job. + + This field is a member of `oneof`_ ``job_type``. + postdeploy_job (google.cloud.deploy_v1.types.PostdeployJob): + Output only. A postdeploy Job. + This field is a member of `oneof`_ ``job_type``. create_child_rollout_job (google.cloud.deploy_v1.types.CreateChildRolloutJob): Output only. A createChildRollout Job. @@ -3070,6 +3204,18 @@ class State(proto.Enum): oneof="job_type", message="VerifyJob", ) + predeploy_job: "PredeployJob" = proto.Field( + proto.MESSAGE, + number=9, + oneof="job_type", + message="PredeployJob", + ) + postdeploy_job: "PostdeployJob" = proto.Field( + proto.MESSAGE, + number=10, + oneof="job_type", + message="PostdeployJob", + ) create_child_rollout_job: "CreateChildRolloutJob" = proto.Field( proto.MESSAGE, number=6, @@ -3092,6 +3238,36 @@ class VerifyJob(proto.Message): r"""A verify Job.""" +class PredeployJob(proto.Message): + r"""A predeploy Job. + + Attributes: + actions (MutableSequence[str]): + Output only. The custom actions that the + predeploy Job executes. + """ + + actions: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + + +class PostdeployJob(proto.Message): + r"""A postdeploy Job. + + Attributes: + actions (MutableSequence[str]): + Output only. The custom actions that the + postdeploy Job executes. + """ + + actions: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + + class CreateChildRolloutJob(proto.Message): r"""A createChildRollout Job.""" @@ -3530,6 +3706,15 @@ class JobRun(proto.Message): verify_job_run (google.cloud.deploy_v1.types.VerifyJobRun): Output only. Information specific to a verify ``JobRun``. + This field is a member of `oneof`_ ``job_run``. + predeploy_job_run (google.cloud.deploy_v1.types.PredeployJobRun): + Output only. Information specific to a predeploy ``JobRun``. + + This field is a member of `oneof`_ ``job_run``. + postdeploy_job_run (google.cloud.deploy_v1.types.PostdeployJobRun): + Output only. Information specific to a postdeploy + ``JobRun``. + This field is a member of `oneof`_ ``job_run``. create_child_rollout_job_run (google.cloud.deploy_v1.types.CreateChildRolloutJobRun): Output only. Information specific to a createChildRollout @@ -3621,6 +3806,18 @@ class State(proto.Enum): oneof="job_run", message="VerifyJobRun", ) + predeploy_job_run: "PredeployJobRun" = proto.Field( + proto.MESSAGE, + number=14, + oneof="job_run", + message="PredeployJobRun", + ) + postdeploy_job_run: "PostdeployJobRun" = proto.Field( + proto.MESSAGE, + number=15, + oneof="job_run", + message="PostdeployJobRun", + ) create_child_rollout_job_run: "CreateChildRolloutJobRun" = proto.Field( proto.MESSAGE, number=12, @@ -3672,7 +3869,7 @@ class FailureCause(proto.Enum): Cloud Build is not available, either because it is not enabled or because Cloud Deploy has insufficient permissions. See `Required - permission `__. + permission `__. EXECUTION_FAILED (2): The deploy operation did not complete successfully; check Cloud Build logs. @@ -3753,7 +3950,7 @@ class FailureCause(proto.Enum): Cloud Build is not available, either because it is not enabled or because Cloud Deploy has insufficient permissions. See `required - permission `__. + permission `__. EXECUTION_FAILED (2): The verify operation did not complete successfully; check Cloud Build logs. @@ -3796,6 +3993,129 @@ class FailureCause(proto.Enum): ) +class PredeployJobRun(proto.Message): + r"""PredeployJobRun contains information specific to a predeploy + ``JobRun``. + + Attributes: + build (str): + Output only. The resource name of the Cloud Build ``Build`` + object that is used to execute the custom actions associated + with the predeploy Job. Format is + projects/{project}/locations/{location}/builds/{build}. + failure_cause (google.cloud.deploy_v1.types.PredeployJobRun.FailureCause): + Output only. The reason the predeploy failed. + This will always be unspecified while the + predeploy is in progress or if it succeeded. + failure_message (str): + Output only. Additional information about the + predeploy failure, if available. + """ + + class FailureCause(proto.Enum): + r"""Well-known predeploy failures. + + Values: + FAILURE_CAUSE_UNSPECIFIED (0): + No reason for failure is specified. + CLOUD_BUILD_UNAVAILABLE (1): + Cloud Build is not available, either because it is not + enabled or because Cloud Deploy has insufficient + permissions. See `required + permission `__. + EXECUTION_FAILED (2): + The predeploy operation did not complete + successfully; check Cloud Build logs. + DEADLINE_EXCEEDED (3): + The predeploy build did not complete within + the alloted time. + CLOUD_BUILD_REQUEST_FAILED (4): + Cloud Build failed to fulfill Cloud Deploy's request. See + failure_message for additional details. + """ + FAILURE_CAUSE_UNSPECIFIED = 0 + CLOUD_BUILD_UNAVAILABLE = 1 + EXECUTION_FAILED = 2 + DEADLINE_EXCEEDED = 3 + CLOUD_BUILD_REQUEST_FAILED = 4 + + build: str = proto.Field( + proto.STRING, + number=1, + ) + failure_cause: FailureCause = proto.Field( + proto.ENUM, + number=2, + enum=FailureCause, + ) + failure_message: str = proto.Field( + proto.STRING, + number=3, + ) + + +class PostdeployJobRun(proto.Message): + r"""PostdeployJobRun contains information specific to a postdeploy + ``JobRun``. + + Attributes: + build (str): + Output only. The resource name of the Cloud Build ``Build`` + object that is used to execute the custom actions associated + with the postdeploy Job. Format is + projects/{project}/locations/{location}/builds/{build}. + failure_cause (google.cloud.deploy_v1.types.PostdeployJobRun.FailureCause): + Output only. The reason the postdeploy + failed. This will always be unspecified while + the postdeploy is in progress or if it + succeeded. + failure_message (str): + Output only. Additional information about the + postdeploy failure, if available. + """ + + class FailureCause(proto.Enum): + r"""Well-known postdeploy failures. + + Values: + FAILURE_CAUSE_UNSPECIFIED (0): + No reason for failure is specified. + CLOUD_BUILD_UNAVAILABLE (1): + Cloud Build is not available, either because it is not + enabled or because Cloud Deploy has insufficient + permissions. See `required + permission `__. + EXECUTION_FAILED (2): + The postdeploy operation did not complete + successfully; check Cloud Build logs. + DEADLINE_EXCEEDED (3): + The postdeploy build did not complete within + the alloted time. + CLOUD_BUILD_REQUEST_FAILED (4): + Cloud Build failed to fulfill Cloud Deploy's request. See + failure_message for additional details. + """ + FAILURE_CAUSE_UNSPECIFIED = 0 + CLOUD_BUILD_UNAVAILABLE = 1 + EXECUTION_FAILED = 2 + DEADLINE_EXCEEDED = 3 + CLOUD_BUILD_REQUEST_FAILED = 4 + + build: str = proto.Field( + proto.STRING, + number=1, + ) + failure_cause: FailureCause = proto.Field( + proto.ENUM, + number=2, + enum=FailureCause, + ) + failure_message: str = proto.Field( + proto.STRING, + number=3, + ) + + class CreateChildRolloutJobRun(proto.Message): r"""CreateChildRolloutJobRun contains information specific to a createChildRollout ``JobRun``. diff --git a/packages/google-cloud-deploy/noxfile.py b/packages/google-cloud-deploy/noxfile.py index 6f5debd52f23..9a2acd8b6787 100644 --- a/packages/google-cloud-deploy/noxfile.py +++ b/packages/google-cloud-deploy/noxfile.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2018 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-deploy/samples/generated_samples/snippet_metadata_google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated_samples/snippet_metadata_google.cloud.deploy.v1.json index 1fccdc3744aa..77254ec7276f 100644 --- a/packages/google-cloud-deploy/samples/generated_samples/snippet_metadata_google.cloud.deploy.v1.json +++ b/packages/google-cloud-deploy/samples/generated_samples/snippet_metadata_google.cloud.deploy.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-deploy", - "version": "1.11.1" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-deploy/scripts/decrypt-secrets.sh b/packages/google-cloud-deploy/scripts/decrypt-secrets.sh index 21f6d2a26d90..0018b421ddf8 100755 --- a/packages/google-cloud-deploy/scripts/decrypt-secrets.sh +++ b/packages/google-cloud-deploy/scripts/decrypt-secrets.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 Google Inc. All rights reserved. +# Copyright 2023 Google LLC All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-deploy/tests/unit/gapic/deploy_v1/test_cloud_deploy.py b/packages/google-cloud-deploy/tests/unit/gapic/deploy_v1/test_cloud_deploy.py index 31718edd121a..e8d24fc79546 100644 --- a/packages/google-cloud-deploy/tests/unit/gapic/deploy_v1/test_cloud_deploy.py +++ b/packages/google-cloud-deploy/tests/unit/gapic/deploy_v1/test_cloud_deploy.py @@ -8641,7 +8641,15 @@ def test_create_delivery_pipeline_rest(request_type): "target_id": "target_id_value", "profiles": ["profiles_value1", "profiles_value2"], "strategy": { - "standard": {"verify": True}, + "standard": { + "verify": True, + "predeploy": { + "actions": ["actions_value1", "actions_value2"] + }, + "postdeploy": { + "actions": ["actions_value1", "actions_value2"] + }, + }, "canary": { "runtime_config": { "kubernetes": { @@ -8665,6 +8673,8 @@ def test_create_delivery_pipeline_rest(request_type): "canary_deployment": { "percentages": [1170, 1171], "verify": True, + "predeploy": {}, + "postdeploy": {}, }, "custom_canary_deployment": { "phase_configs": [ @@ -8676,6 +8686,8 @@ def test_create_delivery_pipeline_rest(request_type): "profiles_value2", ], "verify": True, + "predeploy": {}, + "postdeploy": {}, } ] }, @@ -8926,7 +8938,15 @@ def test_create_delivery_pipeline_rest_bad_request( "target_id": "target_id_value", "profiles": ["profiles_value1", "profiles_value2"], "strategy": { - "standard": {"verify": True}, + "standard": { + "verify": True, + "predeploy": { + "actions": ["actions_value1", "actions_value2"] + }, + "postdeploy": { + "actions": ["actions_value1", "actions_value2"] + }, + }, "canary": { "runtime_config": { "kubernetes": { @@ -8950,6 +8970,8 @@ def test_create_delivery_pipeline_rest_bad_request( "canary_deployment": { "percentages": [1170, 1171], "verify": True, + "predeploy": {}, + "postdeploy": {}, }, "custom_canary_deployment": { "phase_configs": [ @@ -8961,6 +8983,8 @@ def test_create_delivery_pipeline_rest_bad_request( "profiles_value2", ], "verify": True, + "predeploy": {}, + "postdeploy": {}, } ] }, @@ -9097,7 +9121,15 @@ def test_update_delivery_pipeline_rest(request_type): "target_id": "target_id_value", "profiles": ["profiles_value1", "profiles_value2"], "strategy": { - "standard": {"verify": True}, + "standard": { + "verify": True, + "predeploy": { + "actions": ["actions_value1", "actions_value2"] + }, + "postdeploy": { + "actions": ["actions_value1", "actions_value2"] + }, + }, "canary": { "runtime_config": { "kubernetes": { @@ -9121,6 +9153,8 @@ def test_update_delivery_pipeline_rest(request_type): "canary_deployment": { "percentages": [1170, 1171], "verify": True, + "predeploy": {}, + "postdeploy": {}, }, "custom_canary_deployment": { "phase_configs": [ @@ -9132,6 +9166,8 @@ def test_update_delivery_pipeline_rest(request_type): "profiles_value2", ], "verify": True, + "predeploy": {}, + "postdeploy": {}, } ] }, @@ -9367,7 +9403,15 @@ def test_update_delivery_pipeline_rest_bad_request( "target_id": "target_id_value", "profiles": ["profiles_value1", "profiles_value2"], "strategy": { - "standard": {"verify": True}, + "standard": { + "verify": True, + "predeploy": { + "actions": ["actions_value1", "actions_value2"] + }, + "postdeploy": { + "actions": ["actions_value1", "actions_value2"] + }, + }, "canary": { "runtime_config": { "kubernetes": { @@ -9391,6 +9435,8 @@ def test_update_delivery_pipeline_rest_bad_request( "canary_deployment": { "percentages": [1170, 1171], "verify": True, + "predeploy": {}, + "postdeploy": {}, }, "custom_canary_deployment": { "phase_configs": [ @@ -9402,6 +9448,8 @@ def test_update_delivery_pipeline_rest_bad_request( "profiles_value2", ], "verify": True, + "predeploy": {}, + "postdeploy": {}, } ] }, @@ -12106,7 +12154,15 @@ def test_create_release_rest(request_type): "target_id": "target_id_value", "profiles": ["profiles_value1", "profiles_value2"], "strategy": { - "standard": {"verify": True}, + "standard": { + "verify": True, + "predeploy": { + "actions": ["actions_value1", "actions_value2"] + }, + "postdeploy": { + "actions": ["actions_value1", "actions_value2"] + }, + }, "canary": { "runtime_config": { "kubernetes": { @@ -12130,6 +12186,8 @@ def test_create_release_rest(request_type): "canary_deployment": { "percentages": [1170, 1171], "verify": True, + "predeploy": {}, + "postdeploy": {}, }, "custom_canary_deployment": { "phase_configs": [ @@ -12141,6 +12199,8 @@ def test_create_release_rest(request_type): "profiles_value2", ], "verify": True, + "predeploy": {}, + "postdeploy": {}, } ] }, @@ -12464,7 +12524,15 @@ def test_create_release_rest_bad_request( "target_id": "target_id_value", "profiles": ["profiles_value1", "profiles_value2"], "strategy": { - "standard": {"verify": True}, + "standard": { + "verify": True, + "predeploy": { + "actions": ["actions_value1", "actions_value2"] + }, + "postdeploy": { + "actions": ["actions_value1", "actions_value2"] + }, + }, "canary": { "runtime_config": { "kubernetes": { @@ -12488,6 +12556,8 @@ def test_create_release_rest_bad_request( "canary_deployment": { "percentages": [1170, 1171], "verify": True, + "predeploy": {}, + "postdeploy": {}, }, "custom_canary_deployment": { "phase_configs": [ @@ -12499,6 +12569,8 @@ def test_create_release_rest_bad_request( "profiles_value2", ], "verify": True, + "predeploy": {}, + "postdeploy": {}, } ] }, @@ -14469,10 +14541,18 @@ def test_create_rollout_rest(request_type): "job_run": "job_run_value", "deploy_job": {}, "verify_job": {}, + "predeploy_job": { + "actions": ["actions_value1", "actions_value2"] + }, + "postdeploy_job": { + "actions": ["actions_value1", "actions_value2"] + }, "create_child_rollout_job": {}, "advance_child_rollout_job": {}, }, "verify_job": {}, + "predeploy_job": {}, + "postdeploy_job": {}, }, "child_rollout_jobs": { "create_rollout_jobs": {}, @@ -14734,10 +14814,18 @@ def test_create_rollout_rest_bad_request( "job_run": "job_run_value", "deploy_job": {}, "verify_job": {}, + "predeploy_job": { + "actions": ["actions_value1", "actions_value2"] + }, + "postdeploy_job": { + "actions": ["actions_value1", "actions_value2"] + }, "create_child_rollout_job": {}, "advance_child_rollout_job": {}, }, "verify_job": {}, + "predeploy_job": {}, + "postdeploy_job": {}, }, "child_rollout_jobs": { "create_rollout_jobs": {},