Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Allow variables when importing shared pipelines

Jefferson Fermo September 16, 2025

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

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 17, 2025

Hi @Jefferson Fermo 

As per the documentation:

  • There is a known limitation with using variables in custom pipelines that utilize a shared Pipeline Configuration. If a repository imports a shared Pipeline Configuration and uses it as part of a custom pipeline, variable values specified at runtime via the UI will not pass to the pipeline execution. Instead, the default values specified in the exported Pipeline configuration will be used.

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)

 

Jefferson Fermo September 18, 2025

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

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 18, 2025

Hi @Jefferson Fermo 

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)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events