Bamboo Variable Promotion: Local Builds Succeed, Production Deployments Fail
0 reputation · 10 Jul 2024, 02:29 UTC
0 reputation · 10 Jul 2024, 02:29 UTC
In Bamboo 8.x, build‑plan variables can be promoted to deployment projects. Locally, a promoted variable is automatically available to the agent, so test builds complete without issue. When the same plan is run on a production instance, the deployment project often receives an empty value or no value at all, causing downstream failures.
The UI indicates that promotion applies to all deployments by default, yet the REST API requires each deployment project to declare the promoted variables explicitly. If a deployment environment lacks the variable declaration, Bamboo silently substitutes an empty string.
Uncertainty remains about how promoted variables are inherited by child plans or downstream pipelines, and whether a global promotion setting exists that can override the per‑project requirement.
31775 reputation · 10 Jul 2024, 11:15 UTC
Promoted build‑plan variables are not automatically propagated to deployment projects in Bamboo 8.x. The UI shows a “default to all deployments” flag, but the underlying deployment‑project configuration still requires each environment to declare the promoted variable. When an environment lacks that declaration, Bamboo silently substitutes an empty string, explaining why local builds succeed while production deployments fail.
variables section, but the API does not automatically update all environments that reference the plan.Variables tab, and confirm the variable is marked Promoted.Deployment Projects section to see which projects are listed for promotion.Variables, and ensure the promoted variable appears under the Plan Variables section.Scope to Plan.curl -u user:pass \
-H "Content-Type: application/json" \
https://bamboo.example.com/rest/api/latest/deploy/project/PROJECT_KEY
variables array and add an entry:
{
"name": "MY_VAR",
"type": "plan",
"value": "${bamboo.planResult.buildNumber}"
}
Variable expansion step. The promoted variable should now resolve to the expected value.Plan Variable in the parent plan, then promote it to the child. The child will inherit it only if the child’s deployment project explicitly maps the promoted variable.Global Variable in Bamboo’s Administration → Global Variables to avoid per‑environment mapping.variables section of each deployment project after a promotion.Could you confirm which deployment projects currently lack the promoted variable in their configuration? Knowing this will help pinpoint any drift between the UI and the API state.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.