Hi,
Is there a way to be able to use variables ${{}} when using imported pipelines, this is to allow us to easily roll forward/backward versions of our shared pipeline?
pipelines:
custom:
release_start:
import: maven_shared_bitbucket_pipelines:${{MAVEN_SHARED_BITBUCKET_PIPELINES_VERSION}}:release_start
Regards,
jeff
As per the documentation:
We have a feature request to allow you to pass variables in the import statement, please Watch it to receive future updates related to it:
Cheers!
- Ben (Bitbucket Cloud Support)
Hi Ben,
Thank you for the reference though I believe my concern is a bit different as I am not trying to pass a variable from the parent to the exported pipeline but rather I would like to the use a variable within the same parent pipeline by using ${{}} .
Regards,
Jeff
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for clarifying your use case.
Currently, Bitbucket Pipelines does not support using variables (such as ${{MAVEN_SHARED_BITBUCKET_PIPELINES_VERSION}}
) within the import
statement of your pipeline YAML. The import
path must be a static string, and variable interpolation is not available in this context.
This means that to change the version of your shared pipeline, you’ll need to manually update the import path in your YAML file.
I understand how valuable dynamic imports would be for managing shared pipeline versions more easily. While there is an existing feature request for passing variables to imported pipelines (BCLOUD-22869), there isn’t currently a public request specifically for variable interpolation in the import path itself.
I've raised a feature request on your behalf - please Watch this to receive future updates related to it and Vote for it to improve its visibility with regard to customer demand:
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.