---
sourceDocument: Gestion des services IT Australie
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/fr-FR/it-service-management

 Release :

    - australia

ft:locale :

    - fr-FR

ft:publication_title :

    - Gestion des services IT Australie

ft:clusterId :

    - itsm

bundleId :

    - itsm

workflow :

    - Technology


---

# Configurer manuellement des webhooks dans Argo CD

# Configurer manuellement des webhooks dans Argo CD {#ariaid-title1}

* Rversion finale: Australia
* 
* Mis à jour 12 mars 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute de lecture

Configurez des webhooks dans Argo CD pour envoyer des notifications de synchronisation à l'application Vélocité de changement DevOps.

## Avant de commencer

Rôle requis : administrateur Argo CD

## Pourquoi et quand exécuter cette tâche

L'abonnement aux événements de l'application Argo CD peut être défini à l'aide de l'annotation `notifications.argoproj.io/subscribe.<trigger>.<service>: <recipient>`.

## Procédure

1. Dans Argo CD, mettez à jour ConfigMap: argocd-notifications-cm.yaml pour configurer les notifications envoyées à Vélocité de changement DevOps.  

       apiVersion: v1 
       kind: configMap 
       metadata: 
         name: argocd-notifications-cm 
         namespace: default 
       data: 
         context: | 
           argocdUrl: "https://<argocdURL>" 
         service.webhook.sn_devops_argocd: | 
           url: https://<instance>.service-now.com/api/sn_devops/v2/devops/tool/orchestration?toolId=<toolId> 
           basicAuth: #optional username password 
             username: "" 
             password: "" 
         template.app-sync-succeeded: | 
           webhook: 
             sn_devops_argocd: 
               method: POST 
               body: | 
                 {  
                 "titleLink" : "http://<argocdURL>/applications/{{.app.metadata.name}}", 
                 "syncStatus" : "{{.app.status.sync.status}}", 
                 "repo" : "{{.app.spec.source.repoURL}}", 
                 "revision": "{{.app.status.sync.revision}}", 
                 "path": "/repos/{{call .repo.FullNameByRepoURL .app.spec.source.repoURL}}/statuses/{{.app.status.operationState.operation.sync.revision}}", 
                 "commitAuthor" : "{{(call .repo.GetCommitMetadata .app.status.sync.revision).Author}}", 
                 "commitMessage" : "{{(call .repo.GetCommitMetadata .app.status.sync.revision).Message}}", 
                 "commitTags" : "{{(call .repo.GetCommitMetadata .app.status.sync.revision).Tags}}", 
                 "startedAt" : "{{.app.status.operationState.startedAt}}", 
                 "finishedAt" : "{{.app.status.operationState.finishedAt}}", 
                 "message": "{{.app.metadata.name}} app is synced" 
                 } 
         trigger.on-sync-status-unknown: | 
           - description: Application status is 'Unknown' 
             send: 
             - app-sync-status-unknown 
             when: app.status.sync.status == 'Unknown' 
         trigger.on-sync-succeeded: | 
           - description: Application syncing has succeeded 
             send: 
             - app-sync-succeeded 
             when: app.status.operationState.phase in ['Succeeded'] 
         subscriptions: | 
           - recipients: 
             - sn_devops_argocd 
             triggers: 
             - on-sync-succeeded 
             - on-sync-status-unknown

2. Ouvrez l'application Argo CD pour laquelle vous configurez des webhooks.
3. Accédez à DÉTAILS DE L'APPLICATION \> RÉSUMÉ.
4. Ajoutez l'annotation notifications.argoproj.io/subscribe.\<trigger\>.\<service\>: \<recipient\> avec la condition de déclenchement pour synchroniser l'état du changement pour votre instance.  
   Par exemple, notifications.argoproj.io/subscribe.on-sync-succeeded.sn_devops_argocd.

