We've written a plugin that triggers deployment plans programatically. After upgrading from 5.6 to 5.9 it has broken due to a backwards incompatible change in the bamboo api. Previously we used
Deploymentcontext context = deploymentExecutionService.prepareDeploymentContext(environment, version, reason); deploymentExecutionService.execute(context);
However in 5.9, deploymentExecutionService.execute now takes an environment and an EnvironmentTriggeringAction. I can't figure out how i'm supposed to create an EnvironmentTriggeringAction since it's an interface. i found EnvironmentTriggeringActionFactory, but that's also an interface. I tried wiring it in just like a service, but it doesn't get wired in. I can't find anything else that would let me create an EnvironmentTriggeringAction.
How am i supposed to trigger deploy plans now?
Also, tangentially, why was backwards compatibility broken without warning in the api changelog?
1) The change had to be done because old logic was broken. There is no meaningful implementation for the old interface and it had to be removed. See: BAM-15501
2) Moreover, the correct method to be called when triggering deployment is NonBlockingPlanExecutionService.tryToStart(
environment, environmentTriggeringAction). The method's signature:
Future<ExecutionRequestResult> tryToStart(@NotNull Triggerable triggerable, @NotNull BuildDetectionAction buildDetectionAction);
3) EnvironmentTriggeringAction is an interface because plugins triggering deployments are supposed to implement it. You can find examples in Bamboo source code.
4) If you want to use one of existing implementations of EnvironmentTriggeringAction, EnvironmentTriggeringActionFactory is available to plugins. In fact, deployment triggers built-in in Bamboo are implemented as plugins. They wouldn't work if the factory wasn't available to them.
(did you put <component-import> statement into your atlassian-plugin.xml?)
Also, DeploymentExecutionService is now correctly annotated as @Internal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How am i supposed to trigger deploy plans now?
Good question, I hope an Atlassian Bamboo team member chimes in here.
Also, tangentially, why was backwards compatibility broken without warning in the api changelog?
Likewise a good question - we had stumbled over a significant (and as of today still undocumented) Bamboo 5.9 API change as well, and I have requested a resp. changelog update two month ago already, which you might want to watch/vote/comment on accordingly:
While the minor sorting issue mentioned there too has meanwhile been (silently) fixed, the Changes for 5.9 documentation itself has not yet been amended in any way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.