Export secrets as environement variables for the next steps


we’re thinking about switching to Circle CI and are currently testing a few CI providers. All our secrets are curently stored on AWS Secrets Manager and we’d like to be able to load them as environment variables for the next jobs.

Is there a way to export env variables from a job ? Codefresh exposes a file env_vars_to_export where we can write to expose env vars on the whole pipeline. We wrote a test plugin for that and it works well https://github.com/PathMotion/aws-secrets-manager-codefresh-step

What would be the CircleCI equivalent of that ?

If you want to share data between jobs in a single workflow, then use workspaces. This is a way of saving/loading a folder. You could create a file per variable, or store them all in XML/JSON etc, and load them into env vars from there.