Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questa pagina spiega come creare e gestire i deployment per la tua
app Google Chat. Mantenendo deployment diversi, puoi
gestire meglio ogni fase del ciclo di vita della tua app Chat
e rilasciare in sicurezza le modifiche in produzione.
Crea deployment per ogni fase del ciclo di vita dell'app
Per gestire la tua app di chat durante il suo ciclo di vita, ti consigliamo di creare ed eseguire il deployment di un'app di chat per ciascuno dei seguenti ambienti:
Sviluppo:l'ambiente che utilizzi per lavorare alle modifiche. Se
necessario, puoi utilizzare il deployment della testa o eseguire questo ambiente localmente.
Gestione temporanea:l'ambiente in cui esegui il deployment per i trusted tester per i test end-to-end. Questo ambiente deve essere il più vicino possibile alla produzione.
Per ogni app di chat che implementi, devi creare un progetto Google Cloud. Quando configuri l'API Chat in ogni progetto Cloud, valuta la possibilità di utilizzare un nome dell'app, un URL dell'avatar e una descrizione distinti, in modo da poter distinguere meglio le app Chat in Google Chat.
Nell'esempio seguente, l'app Chat
chiamata Task app è basata su HTTP e utilizza endpoint diversi per il deployment in
sviluppo, gestione temporanea e produzione:
Gestire le implementazioni in base all'architettura dell'app Chat
La seguente tabella include ulteriori considerazioni per la gestione delle implementazioni
per architetture specifiche dell'app di chat:
Architettura
Formato di deployment
Considerazioni
HTTP
URL endpoint HTTP
Implementa le modifiche in modo progressivo in ogni endpoint del ciclo di vita della tua app Chat. Ad esempio, dopo aver testato una nuova funzionalità di cui è stato eseguito il deployment nell'endpoint di staging http://example.com/api/myapp/staging, rilascia la funzionalità in produzione eseguendo il deployment nell'endpoint di produzione, ad esempio http://example.com/api/myapp.
Per eseguire il debug del codice prima del deployment, puoi impostare un endpoint per il tuo ambiente locale. Per scoprire come testare le modifiche localmente, consulta
Eseguire il debug delle app Google Chat.
Google Apps Script
ID deployment
I progetti Apps Script possono avere un solo ramo ed essere
associati a un solo progetto Cloud. Per testare le modifiche e gestire
più ambienti, devi creare progetti Apps Script diversi
per ogni ambiente.
Devi utilizzare il deployment della versione Head del progetto Apps Script solo per l'ambiente di sviluppo. Per gli ambienti di gestione temporanea e produzione, utilizza i deployment con controllo delle versioni. Per maggiori dettagli, consulta
Creare e gestire i deployment
nella documentazione di Apps Script.
Pub/Sub
Argomento Pub/Sub
Devi utilizzare un argomento Pub/Sub diverso per ogni deployment.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-31 UTC."],[[["\u003cp\u003eManage your Google Chat app's lifecycle by creating separate deployments for development, staging, and production environments.\u003c/p\u003e\n"],["\u003cp\u003eCreate a distinct Google Cloud project for each deployment, using unique app names, avatar URLs, and descriptions for clarity.\u003c/p\u003e\n"],["\u003cp\u003eDeploy changes progressively through each environment, starting with development and moving to staging before releasing to production.\u003c/p\u003e\n"],["\u003cp\u003eFor Apps Script projects, maintain separate projects for each environment due to their single-branch limitation.\u003c/p\u003e\n"],["\u003cp\u003eUtilize different Pub/Sub topics for individual deployments to ensure environment isolation.\u003c/p\u003e\n"]]],["The document outlines creating and managing deployments for Google Chat apps across development, staging, and production environments. Each environment requires a separate Google Cloud project with a distinct app name and details. Deployment methods vary: HTTP uses endpoint URLs, Apps Script utilizes deployment IDs and separate projects, and Pub/Sub employs unique topics. Changes should be progressively deployed, starting from development, then staging, and finally production. Different app architectures require different consideration.\n"],null,["# Create and manage deployments for your Google Chat app\n\nThis page explains how to create and management deployments for your\nGoogle Chat app. By maintaining different deployments, you can\nbetter manage each phase of your Chat app's lifecycle\nand safely release changes to production.\n\nCreate deployments for each phase of the app lifecycle\n------------------------------------------------------\n\nTo manage your Chat app throughout its lifecycle, we\nrecommend that you create and deploy a Chat app for\neach of the following environments:\n\n- **Development:** The environment that you use to work on changes. If needed, you can use the head deployment or run this environment locally.\n- **Staging:** The environment that you deploy to trusted testers for end-to-end testing. This environment should be as close to production as possible.\n- **Production:** The environment that you deploy to end users by [publishing\n your Chat app to the\n Google Workspace Marketplace](/workspace/marketplace/how-to-publish).\n\nFor each Chat app that you deploy, you must create a\nGoogle Cloud project. When you configure the Chat API in each\nCloud project, consider using a distinct app name, avatar URL, and\ndescription so that you can better distinguish between the\nChat apps in Google Chat.\n\nIn the following example, the Chat app\ncalled `Task app` is built on HTTP and uses different endpoints to deploy to\ndevelopment, staging, and production:\n\n| Environment | Cloud project name | App name | HTTP endpoint URL |\n|-------------|-------------------------|------------------|----------------------------------------|\n| Development | `task-chat-app-dev` | Dev Task app | `http://example.com/api/myapp/head` |\n| Staging | `task-chat-app-staging` | Staging Task app | `http://example.com/api/myapp/staging` |\n| Production | `task-chat-app` | Task app | `http://example.com/api/myapp/` |\n\n### Manage deployments based on your Chat app architecture\n\nThe following table includes additional considerations when managing deployments\nfor specific [Chat app\narchitectures](/workspace/chat/structure):\n\n| Architecture | Deployment format | Considerations |\n|--------------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| HTTP | HTTP endpoint URL | - Deploy changes progressively to each endpoint in your Chat app's lifecycle. For example, after you've tested a new feature deployed in your staging endpoint `http://example.com/api/myapp/staging`, release the feature to production by deploying it to your production endpoint, such as `http://example.com/api/myapp`. - To debug code before deploying, you can set an endpoint to your local environment. To learn how to test changes locally, see [Debug Google Chat apps](/chat/troubleshoot/debug). |\n| Google Apps Script | Deployment ID | - Apps Script projects can only have a single branch and be associated with one Cloud project. To test changes and maintain multiple environments, you must create different Apps Script projects for each environment. - You should only use the Apps Script project's head deployment for the development environment. For staging and production environments, use versioned deployments. For details, see [Create and manage deployments](/apps-script/concepts/deployments) in the Apps Script documentation. |\n| Pub/Sub | Pub/Sub topic | You should use a different Pub/Sub topic for each deployment. |\n\nRelated topics\n--------------\n\n- [Test interactive features for Google Chat apps](/workspace/chat/test-interactive-features)\n- [Create and manage Apps Script deployments](/apps-script/concepts/deployments)\n- [Choose a Chat app architecture](/workspace/chat/structure)"]]