Our team recently jumped up to Bitbucket Premium in the hope that we could use Dynamic Pipelines to make it easier to track deployments to our many environments, without having to modify our YAML file each time we add or remove one.
We understand that there are two different executions for the dynamic pipeline module and have the first one working as we expect where we can add a new pipeline named after each environment (based on what we've defined in the repository settings). However, this all falls apart when the second execution scenario (triggered manually) occurs as we no longer have access to the original full pipelines configuration, that we base the dynamically generates ones off.
Our alternative solution was to use the dropdown feature of pipelines (allowed-values) to list out target environments (which we worked out how to do dynamically based on an API call to the environments endpoint). This again was working for the first execution scenario, but when triggered manually, we've found no method of gaining access to which item the user picked when triggering the pipeline. Meaning that we can't dynamically replace the `deployment` value.
TLDR;
We need either:
* A way to access the values entered on a manually triggered pipeline so we can respond to those choices.
* Or a way to access the original pipelines configuration during the manual triggered execution.
Hello @David Boyer
I'm Daniil from Pipelines dev team.
If I got it right, you're looking to reuse some pipeline definition when generating a pipeline for another selector. In this case, as you described, we do send full static configuration to the Dynamic Pipelines provider when we request all available definitions – this is to allow a user to select the pipeline they want to trigger. But on the second request when the user selected a definition that was added dynamically, we won't send any definition from the static configuration because none of them matched the pattern of the selected pipeline.
There are at least two ways to deal with this:
As to making the Dynamic Pipelines provider aware of the custom variable values entered by the user, this is a feature request we are aware of. I was going to say please vote for BCLOUD-23395 and subscribe to it so that you get notified on any updates to this topic, but I can see you've already done that 👍
Hope this helps. Let me know if you have any questions.
Cheers,
Daniil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.