I've copy/pasted the default bamboo build & deployment webhook templates here to add a single header to each.
auth: ${bamboo.webhook.auth_secret}
I then define webhook.auth_secret
variable in my bamboo project and add
- A build webhook notification to my build
- A deploy webhook to my deployment environment
Results:
- The build webhook works fine (variable is sent in HTTP header)
- The deployment webhook fails (
webhook.auth_secret
cannot be substituted)
So why is webhook.auth_secret
variable available to the build webhook but not available to the deployment webhook?
Doing a bit of debugging I can see that webhook.auth_secret
is available in the deployment tasks. I add a script task with
echo webhook.auth_secret=${bamboo.webhook.auth_secret}
And I can see the value is defined (shown as *** since secret)
Note: As a workaround I can add the webhook.auth_secret
variable to every deployment/environment but I'm wanting to define this once, at the project level
I think this is a bug in bamboo where the project variable is available in a deployment script but not available in the deployment webhook.