Hi,I need to pass a variable deployment.environmentName back to my plan but that doesn’t happen.
This is my workflow: build -> deployment to multiple environments -> after deployment trigger BuildPlan to run integration tests
On the screenshot attached to the marketplace listing I can see some deploymentResult Keys and variables?
https://marketplace.atlassian.com/plugins/com.atlassianlab.bamboo.plugins.bamboo-after-deployment-trigger-plugin/server/overview
How do I pass them to a triggered plan?
Cheers
Przemyslaw
Hello @Prem Chudzinski _extensi_,
You can retrieve the deployment.environmentName variable by calling it in a Script task as example:
echo "bamboo.deployment.environmentName" ${bamboo.deployment.environmentName}
So in your example:
build -> deployment to multiple environments -> after deployment trigger BuildPlan to run integration tests
"build", lets say PROJ-PLAN"deployment to multiple environments", lets say QA"after deployment trigger BuildPlan", lets say PROJ-TESTS
In PROJ-TESTS-JOB1, you could add a Script task with the above mentioned, resulting on:
build 02-Jan-2018 19:21:45 bamboo.deployment.environmentName QA
Kind regards,
Rafael
That seems to be the solution,
but now I've got a new issue with the after-deployment-trigger
Here's the scenario
1. PROJ-PLAN1
2. Deployment to QA1 and QA2
3. PROJ-PLAN2 (integration tests) using After Deployment Trigger
At this point I assume the QA1 and QA2 deployments should trigger Proj-PLAN2 twice. I use here
bamboo.deployment.environmentName
To determine against which environment my integration tests should be executed.
What is happening?
Proj-PLAN2 is triggered once.
Sometimes by QA1 sometimes by QA2
In the trigger configuration I've selected Triggering Deployment to "Any" but also tried to create two triggers for QA1 and QA2.
Same result.
Seems like a bug to me.
What do you think?
In the logs I can see
2018-01-03 10:15:42,761 INFO [10-BAM::PlanExec:pool-17-thread-3] [ChainExecutionManagerImpl] Build Proj-PLAN2-JOB1-66 has been dispatched
Only once, and should be triggered twice.
Could you please go to Bamboo administration >> Overview >> Plans >> Concurrent builds and Enable it, setting the Default number of concurrent builds allowed to 2
Save the configuration and re-do the testing.
Bamboo's concurrent builds feature allows you to build a plan concurrently on several agents. You might find this useful if a plan is likely to be triggered again before the current build completes.
For more information - Configuring concurrent builds
It looks like you're new here. Sign in or register to get started.