Forums

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

Shared Pipeline Variables not exported in custom image

fo_connor August 6, 2025

Hi, 

I'm testing the Output Variables feature in Bitbucket Pipelines. My pipelines use a custom in-house runtime Docker image.

 

My main use-case uses a mix of parallel and manual steps, but even when I try a very simple example - the variable is not carried over between steps:

 

  custom:

    Simple Example:

      - step:

          name: Build and Deploy

          script:

            - export MY_VAR="Hello, World!"

            - echo $MY_VAR

          output-variables:

            - MY_VAR

      - step:

          name: Use Output Variable

          script:

            - echo $MY_VAR # This is empty in the UI when running

1 answer

1 accepted

2 votes
Answer accepted
Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2025

Hi @fo_connor - The variable is echoed into $BITBUCKET_PIPELINES_VARIABLES_PATH.

echo MY_VAR=Hello, World! >> $BITBUCKET_PIPELINES_VARIABLES_PATH

Output variables 

+ echo $MY_VAR
Hello, World!

 

fo_connor August 7, 2025

Ah that works, thanks - bit of a weird requirement but sure

Like Edwin Kyalangalilwa likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events