But my environment variable TOKEN is not being injected.
Is there any way to add headers using environment variables ? How do you guys make sure that no one else but you calls your webhook endpoints ? Is this notify property documented anywhere ?
I want to notify my server when jobs succeed and when they fail. I need a POST request with a payload with the job ID or pipeline number, and a way to authenticate using a project environment variable. There is a webhook orb which seems unmaintained. It doesn’t provide a token mechanism but I can create my own orb.
My problem with orbs is that you have to call them in every job, and I want something global.
I just realized something… webhooks are sent AFTER the build has finished. Unfortunately, orbs are executed as regular jobs, so when the orb performs the HTTP post, the workflow status is still “running”…
Why did you guys decided to no longer support webhooks without providing a viable alternative ?
I found this feature request : Workflow level webhook notifications. Please feel free to vote and comment on it. If the idea gets enough votes and comments, it will be prioritized.