Skip to content

Instantly share code, notes, and snippets.

@ppeble
Forked from Sdy603/argoCD.yaml
Created October 15, 2025 17:05
Show Gist options
  • Select an option

  • Save ppeble/69f8e7e663f9d7f97f163929b07196a6 to your computer and use it in GitHub Desktop.

Select an option

Save ppeble/69f8e7e663f9d7f97f163929b07196a6 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-notifications-cm
namespace: argocd
data:
config.yaml: |
templates:
dx-cloud-pipelines:
method: POST
url: https://api.getdx.com/pipelines.run
headers:
Content-Type: application/json
body: |
{
"pipeline_name": "{{ .app.metadata.name }}-{{ .app.metadata.namespace }}",
"pipeline_source": "ArgoCD",
"reference_id": "{{ .app.status.operationState.operation.sync.revision }}-{{ .app.status.operationState.startedAt | date \"Unix\" }}",
"started_at": {{ .app.status.operationState.startedAt | date "Unix" }},
"finished_at": {{ .app.status.operationState.finishedAt | date "Unix" }},
"status": "success",
"commit_sha": "{{ .app.status.operationState.operation.sync.revision }}",
"repository": "{{ .app.spec.source.repoURL | replace \"https://github.com/\" \"\" | replace \".git\" \"\" }}",
"source_url": "{{ .context.argocdUrl }}/applications/{{ .app.metadata.name }}",
"metadata": {
"namespace": "{{ .app.metadata.namespace }}",
"environment": "{{ .app.metadata.namespace }}"
}
}
dx-cloud-deployments:
method: POST
url: https://api.getdx.com/deployments
headers:
Content-Type: application/json
body: |
{
"deployed_at": {{ .app.status.operationState.finishedAt | date "Unix" }},
"service": "{{ .app.metadata.name }}",
"commit_sha": "{{ .app.status.sync.revision }}",
"repository": "{{ .app.spec.source.repoURL | replace \"https://github.com/\" \"\" | replace \".git\" \"\" }}",
"source_url": "{{ .context.argocdUrl }}/applications/{{ .app.metadata.name }}",
"source_name": "ArgoCD",
"metadata": {
"namespace": "{{ .app.metadata.namespace }}",
"environment": "{{ .app.metadata.namespace }}"
}
}
triggers:
- name: on-sync-succeeded
condition: app.status.operationState.phase in ['Succeeded']
template: [dx-cloud-pipelines, dx-cloud-deployments]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment