-
We use Sentry for application error management, which lets you enable a bunch of cool features if you use I couldn't find a documented way to do this with argo, but thought that the ArgoCD resource hooks looked promising. Sending a POST request to Sentry using the This is my job spec: apiVersion: batch/v1
kind: Job
metadata:
name: sentry-release
namespace: <my namespace>
annotations:
argocd.argoproj.io/hook: PostSync
spec:
ttlSecondsAfterFinished: 6000 # for testing
template:
spec:
containers:
- name: curl
image: curlimages/curl:7.85.0
command: [ "curl" ]
args: [
"-L",
"-v",
"https://sentry.io/api/0/organizations/<my org>/releases/$(ARGOCD_APP_REVISION)/deploys/",
"-H", "Authorization: Bearer $(AUTH_TOKEN)",
"-H", "Content-Type: application/json",
"-d", '{"environment":"staging", "projects": ["<my project>"]}'
]
envFrom:
- secretRef:
name: sentry # contains my AUTH_TOKEN
restartPolicy: Never
backoffLimit: 1 This works, except The documentation is a bit sparse, but I was hoping the build environment vars might be available in some way. I've tried using Any ideas? Is this a dead end? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Got this to work by making the following change to the spec:
source:
helm:
parameters:
- name: revision
value: $ARGOCD_APP_REVISION And the following to my deployment env:
- name: ARGOCD_APP_REVISION
value: ${{ .Values.revision }} |
Beta Was this translation helpful? Give feedback.
Got this to work by making the following change to the
Application
CRD:And the following to my deployment