Skip to main content
All CollectionsKnowledge BaseGeneral issues
Using Environment Variables across builds
Using Environment Variables across builds
Updated over 4 months ago

Issue:

You need to use an Environment Variable (Env Var) in multiple builds and change its value during each build. For example, your build needs a counter that is incremented with each build.

Possible solutions:

1. Use the envman tool which creates an .envstore file that can be cached.

2. Use the Bitrise.io Cache:Push Step to cache the file and the Bitrise.io Cache:Pull Step to retrieve the file.

Here is an example of adding an Env Var MY_TEST_ENV_KEY and setting the value to test value for test key:

envman add --key MY_TEST_ENV_KEY --value 'test value for test key'

Additional information:

Did this answer your question?