最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Bamboo deployment webhook context different from deployment script context - Stack Overflow

programmeradmin0浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论