Sharing Env variables between stages

Hey there

Simple question : How do I share a simple environment variable between two stages ?

Let’s assume I’m having a pipeline

  • Stage 1
    • Workflow 1
      • Script : envman add --key MY_VARIABLE --value “123456”
  • Stage 2
    • Workflow 2
      • Script : echo $MY_VARIABLE

I cant make my echo “echo” 123456

I noticed that I can easely share folders between stages, but I can’t manage to have simple variables sharing.
Please don’t tell me to write my variables in a text file, share it, and read it in workflow 2 :slight_smile:

Hi!
That is the current work-around but the actual feature is on our roadmap and we’ll work on it soon.

Damn!
Thanks for your fast reply.
I hope this feature will be implemented soon :slight_smile:

+1 to this feature. Is the roadmap publicly visible?

Implementing parallelisation using build-router-start, we were able to pass env vars from the current workflow to the started builds easily with environment_key_list. Pipelines has taken a step backwards in that regard. We want to migrate from Start Build step to Pipelines to simplify the YAML, yet Pipelines requires such a text file workaround (doing the opposite of our goal).

@joshuaongps We are now looking into possible solutions for this. I and my team would like to explore a few options and get your feedback. Would you be available for a chat next week?

Sure, I’m more than happy to give feedback. Please reach out, via the email associated with this account, to organise a suitable time.

Thank you! Sent you an email.

Hi there! Please post any news here if there were any changes (or planned soon…)
Thanks a lot!
And Thanks for your work!

@anton.naidonov1 we are actively working on this and it is coming soon :slight_smile:

1 Like

Hey all, we have just released our first version of the new Share Pipeline Variables step. This step enables you to export variables to the subsequent stages without the need to use any additional steps there.

Here’s the documentation: Configuring a Bitrise Pipeline - Bitrise Docs

The step: GitHub - bitrise-steplib/bitrise-step-share-pipeline-variable

Looking forward to getting your feedback either here on Discuss, our Slack, or email.