-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
featureNew functionality/enhancementNew functionality/enhancement
Description
Problem
There is currently no way to share environment variables in between steps (see #369). This is useful for users that want to source secrets from custom scripts and use them in terraform.
Solution
To achieve this, we should implement $BASH_ENV type functionality where users can write export statements to the file described by $BASH_ENV which gets source'd at each step:
- run: "echo export TEST=abc >> $BASH_ENV"
- run: "echo $BASH_ENV"
- run: "echo $TEST"
This would result in:
/tmp/kajsldjflksjdljk.sh
abc
Implementation
- Generate a random file for each set of steps
sourcethat file in each step before executing the actual step code
Notes
- This is how CircleCI works: https://circleci.com/docs/2.0/env-vars/#using-bash_env-to-set-environment-variables
- Need Write temp script instead of running with sh -c #337 first (unless we do
sh -c ". $BASH_ENV && {user command}")
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew functionality/enhancementNew functionality/enhancement