Skip to content

Implement BASH_ENV functionality to share env vars between steps. #370

@lkysow

Description

@lkysow

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
  • source that file in each step before executing the actual step code

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew functionality/enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions