How do environment variables get cached?

Are environment variables cached or are they refreshed every time from the project env vars and the context?

  1. Workflow runs triggered by a new commit - gets up to date env vars
  2. Workflow is rerun from Pipelines page
  3. Single job is rerun from workflow page

What happens in these circumstances?

As I understand it, the environment variables are not persisted across operations, but injected when they are called.

Is there something specific you’re trying to solve or just curious?

Thanks. I was rerunning a build and the expected change weren’t taking effect - I wanted to be sure I was getting a fresh set on each iteration of the job.

1 Like