Closed7

ArgoCD sync時にPRコメント

omihirofumiomihirofumi

Applicationannotationsをつける
例:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  annotations:
    # sync成功時
    notifications.argoproj.io/subscribe.on-deployed.github=argocd-notification-test
omihirofumiomihirofumi

とりあえずPRコメントしたいだけなので、以下のような感じにしておく
メンションできるかもついでに確認

apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-notifications-cm
.....
  template.app-deployed: |
    message: |
      Application {{.app.metadata.name}} is now running new version of deployments manifests.
    github:
      repoURLPath: "{{.app.spec.source.repoURL}}"
      revisionPath: "{{.app.status.operationState.syncResult.revision}}"
      pullRequestComment:
        content: |
          @omihirofumi hello

https://github.com/omihirofumi/argocd-pr-comment-test/blob/8109efe52220c71b83fadd7244d04d75ebe83713/myapp/cm.yaml#L23-L33

このスクラップは4ヶ月前にクローズされました