Organízate con las colecciones
Guarda y clasifica el contenido según tus preferencias.
Puedes integrar Cloud Deploy con algunos de los otros sistemas que usas para la distribución de software. En esta página se describe cómo integrar Cloud Deploy con lo siguiente:
Puedes usar Cloud Deploy con Pub/Sub para integrar las pruebas en tu flujo de procesamiento de entrega, de forma que puedas promocionar la versión automáticamente para disfrutar de una entrega continua.
También puedes usar anotaciones en un lanzamiento para proporcionar un enlace a los resultados de las pruebas.
Para obtener más información, consulta el artículo Usar etiquetas y anotaciones con Cloud Deploy.
es el nombre de la versión. Este valor es obligatorio.
PIPELINE_NAME
es el nombre del flujo de procesamiento de entrega que gestiona esta versión. Este valor es obligatorio.
REGION
es la región en la que se ejecuta la canalización. Si has definido la propiedad deploy/region, puedes omitir esta marca.
KEY=VALUE,...
es una lista de uno o varios pares de cadenas clave-valor separados por comas que pueden contener información sobre los resultados de las pruebas y otra información relacionada con las pruebas.
Veamos un ejemplo:
Las anotaciones de los lanzamientos son inmutables, por lo que, si añades una anotación de estado, no podrás actualizar ese estado en el mismo lanzamiento más adelante.
Usar anotaciones para proporcionar acceso a los resultados de las pruebas
Si tienes la URL que apunta a la ubicación donde se pueden consultar los resultados de la prueba, puedes proporcionarla como anotación en un lanzamiento mediante la marca --annotations.
Veamos un ejemplo:
Integración con la gestión de flujos de trabajo de terceros
Cloud Deploy publica mensajes operativos en Pub/Sub.
Tu herramienta de gestión de flujos de trabajo puede suscribirse a estos temas de Pub/Sub y usarlos para activar flujos de trabajo específicos.
Para aprobaciones
El tema clouddeploy-approvals notifica a tu sistema cuando se requiere una aprobación para un lanzamiento. Tu sistema de flujo de trabajo externo puede hacer su magia para obtener la aprobación y, a continuación, llamar a gcloud deploy rollouts approve.
La cuenta que emite el comando rollouts approve debe tener el rol de gestión de identidades y accesos predefinido roles/clouddeploy.approver.
Para configurar un flujo de trabajo de aprobación externo, sigue estos pasos:
En la definición de ese objetivo, incluya requireApproval: true.
Para consumir los mensajes, suscríbete al tema de clouddeploy-approvals
Pub/Sub y configura tu sistema de gestión del flujo de trabajo.
Cuando tu sistema de gestión de flujos de trabajo recibe un mensaje del tema clouddeploy-approvals que incluye "Action": "Required", se inicia un flujo de trabajo de aprobación configurado según los requisitos de tu organización.
El mensaje también incluye una referencia al lanzamiento que se debe aprobar, con el siguiente formato:
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-08-21 (UTC)."],[[["\u003cp\u003eCloud Deploy can integrate with test tooling using Pub/Sub to automate release promotion upon successful deployment and testing.\u003c/p\u003e\n"],["\u003cp\u003eAnnotations on rollouts can be used to provide links to test results, offering a way to access testing information directly.\u003c/p\u003e\n"],["\u003cp\u003eCloud Deploy integrates with third-party workflow management systems through Pub/Sub, allowing for the automation of workflows, including approvals.\u003c/p\u003e\n"],["\u003cp\u003eBy subscribing to the \u003ccode\u003eclouddeploy-approvals\u003c/code\u003e topic, workflow management systems can trigger custom approval processes and manage the approval or rejection of rollouts.\u003c/p\u003e\n"],["\u003cp\u003eBefore performing any integrations, you must ensure that you have enabled the required APIs, defined at least one delivery pipeline and target, and have set up Pub/Sub notifications for \u003ccode\u003eclouddeploy-operations\u003c/code\u003e and \u003ccode\u003eclouddeploy-approvals\u003c/code\u003e topics.\u003c/p\u003e\n"]]],[],null,["# Integrating Cloud Deploy with other systems\n\nYou can integrate Cloud Deploy with some of the other systems you\nrely on for software delivery. This page describes how to integrate Cloud Deploy\nwith the following:\n\n- Test tooling\n- Workflow management\n\nSee [Integrating with your CI system](/deploy/docs/integrating-ci)\nto learn how to call Cloud Deploy from your CI pipeline.\n\nBefore you begin\n----------------\n\nThe instructions on this page assume you already meet the following conditions:\n\n- You have [enabled the applicable APIs](https://console.cloud.google.com/flows/enableapi?apiid=clouddeploy.googleapis.com,cloudbuild.googleapis.com,storage-component.googleapis.com,container.googleapis.com&redirect=https://cloud.google.com/deploy/docs/deploy-app-gke&_ga=2.88599711.504283000.1626992575-1788689322.1622287630)\n\n- You have at least one delivery pipeline [defined](/deploy/docs/config-file)\n and [registered](/deploy/docs/create-pipeline-targets#register_the_delivery_pipeline_and_targets)\n with Cloud Deploy.\n\n- You have at least one [target defined](/deploy/docs/config-files#target_definitions),\n and your delivery pipeline references that target.\n\n- You have [set up Pub/Sub notifications](/deploy/docs/subscribe-deploy-notifications)\n to receive notifications from the following topics:\n\n - `clouddeploy-operations`\n - `clouddeploy-approvals`\n\nIntegrating with automated testing\n----------------------------------\n\nYou can use Cloud Deploy with Pub/Sub to integrate testing\nwith your delivery pipeline, so you can promote the release automatically, for\ncontinuous delivery.\n\nYou can also use annotations on a rollout to provide a link to test results.\nFor more information, see [Using labels and annotations with Cloud Deploy](/deploy/docs/labels-annotations).\n\n### Using Pub/Sub to automate promotion\n\n1. Listen to [Pub/Sub messages](/deploy/docs/subscribe-deploy-notifications)\n from the `clouddeploy-operations` topic.\n\n The message contains the following attributes:\n - `Action: SUCCEED`\n - `ResourceType: Rollout`\n - `Resource: projects/.../locations/.../deliveryPipelines/.../releases/.../rollouts/...`\n2. When you receive a notification that deployment has succeeded, run your tests\n on your deployed application.\n\n3. When your tests succeed, call Cloud Deploy to automatically\n promote to the next stage:\n\n gcloud deploy releases promote \u003cvar label=\"release name\" translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eRELEASE_NAME\u003c/span\u003e\u003c/var\u003e \\\n --delivery-pipeline=\u003cvar label=\"pipeline name\" translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePIPELINE_NAME\u003c/span\u003e\u003c/var\u003e \\\n --region=\u003cvar label=\"region\" translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eREGION\u003c/span\u003e\u003c/var\u003e \\\n --annotations=\u003cvar label=\"annotations\" translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eKEY\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e=\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003eVALUE\u003c/span\u003e\u003cspan class=\"devsite-syntax-p\"\u003e,...\u003c/span\u003e\u003c/var\u003e\n\n where:\n - \u003cvar label=\"release name\" translate=\"no\"\u003eRELEASE_NAME\u003c/var\u003e\n\n is the name of the release. This value is required.\n - \u003cvar label=\"pipeline name\" translate=\"no\"\u003ePIPELINE_NAME\u003c/var\u003e\n\n is the name of the delivery pipeline managing this release. This value is\n required.\n - \u003cvar label=\"region\" translate=\"no\"\u003eREGION\u003c/var\u003e\n\n is the region in which the pipeline is running. If you've set the property\n `deploy/region`, you can omit this flag.\n - \u003cvar label=\"annotations\" translate=\"no\"\u003eKEY=VALUE,...\u003c/var\u003e\n\n is a list of one or more key-value string pairs, comma-separated, which can\n contain information about your test results and other testing information.\n Here's an example:\n\n `gcloud deploy releases promote --annotations=\"from_target=test,status=stable\"`\n\n Annotations on the rollout are immutable, so if you add a status\n annotation, you can't later update that status on the same rollout.\n\n### Using annotations to provide access to test results\n\nIf you have the URL pointing to where test results can be accessed, you can\nprovide that URL as an annotation on a rollout, using the `--annotations` flag.\nHere's an example: \n\n gcloud deploy releases promote --delivery-pipeline=my-demo-app-1 --region=us-central1 --project=my-demo-app-1-project --release=test-release-001 --annotations=\"test_results_url=https://example.com/results/my-demo-app-test-results-dev\"\n\nFor more information, see [Using labels and annotations with Cloud Deploy](/deploy/docs/labels-annotations).\n\nIntegrating with third-party workflow management\n------------------------------------------------\n\nCloud Deploy publishes operational messages to Pub/Sub.\nYour workflow management tool can subscribe to these Pub/Sub topics and use them\nto trigger specific workflows.\n\n### For approvals\n\nThe `clouddeploy-approvals` topic notifies your system when an approval is\nrequired for a rollout. Your external workflow system can then work its magic to\nget the approval, then call `gcloud deploy rollouts approve`.\n\nThe account that issues the `rollouts approve` command must have the predefined\nIAM role `roles/clouddeploy.approver`.\n\nTo set up an external approval workflow:\n\n1. [Require approval on the target](/deploy/docs/promote-release#manage_approvals_for_a_delivery_pipeline).\n\n In the definition for that target, include `requireApproval: true`.\n2. To consume the messages, subscribe to the `clouddeploy-approvals`\n Pub/Sub topic, and set up your workflow management system.\n\n3. When your workflow management system receives a message from the\n `clouddeploy-approvals` topic that includes `\"Action\": \"Required\"`, it kicks off\n an approval workflow, configured according to the requirements of your\n organization.\n\n The message also includes a reference to the rollout to be approved, in the\n following format:\n\n `Resource: projects/.../locations/.../deliveryPipelines/.../releases/.../rollouts/...`\n\n The output of the approval workflow is an [approval or rejection](/deploy/docs/promote-release#manage_approvals_for_a_delivery_pipeline)\n of the rollout.\n4. Your workflow management system returns the approval or rejection to\n Cloud Deploy in the form of the following command:\n\n The command for approval is as follows: \n\n gcloud deploy rollouts approve \u003cvar label=\"rollout\" translate=\"no\"\u003eROLLOUT\u003c/var\u003e \\\n --delivery-pipeline=\u003cvar label=\"pipeline name\" translate=\"no\"\u003ePIPELINE_NAME\u003c/var\u003e \\\n --region=\u003cvar label=\"region\" translate=\"no\"\u003eREGION\u003c/var\u003e \\\n --release=\u003cvar label=\"release name\" translate=\"no\"\u003eRELEASE_NAME\u003c/var\u003e\n\n The command for rejecting the rollout is as follows: \n\n gcloud deploy rollouts reject \u003cvar label=\"rollout\" translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eROLLOUT\u003c/span\u003e\u003c/var\u003e \\\n --delivery-pipeline=\u003cvar label=\"pipeline name\" translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePIPELINE_NAME\u003c/span\u003e\u003c/var\u003e \\\n --region=\u003cvar label=\"region\" translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eREGION\u003c/span\u003e\u003c/var\u003e \\\n --release=\u003cvar label=\"release name\" translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eRELEASE_NAME\u003c/span\u003e\u003c/var\u003e\n\n where:\n - \u003cvar label=\"rollout\" translate=\"no\"\u003eROLLOUT\u003c/var\u003e\n\n is the name of the rollout for which approval was requested.\n - \u003cvar label=\"pipeline name\" translate=\"no\"\u003ePIPELINE_NAME\u003c/var\u003e\n\n is the delivery pipeline managing deployment of your application.\n - \u003cvar label=\"release name\" translate=\"no\"\u003eRELEASE_NAME\u003c/var\u003e\n\n is the name of the release with which this rollout is associated.\n - \u003cvar label=\"region\" translate=\"no\"\u003eREGION\u003c/var\u003e\n\n is the region in which the delivery pipeline is running.\n\nHere's an example:\n\n`gcloud deploy rollouts approve test-rollout --delivery-pipeline=web-app --release=test-release --region=us-central1`"]]