Shared environment variables missing on rebuild


We are facing some issue using the shared resources and workflow.
We set up aws related credentials in our shared resources, and then refers to the shared context like this

  version: 2
      - build:
          context: org-global

Everything works like a charm when build is triggered by hooks. However, when I press the rebuild button, my build fail because of a missing environment variable (AWS_DEFAULT_REGION).

Expectation : the build should have environment variables populated either

See reproduction here :

Note : In the process of reproducing this bug, I got another un related failure first build, maybe because I didn’t set the shared resources before pushing my first commit referring to it.


1 Like

If i understand your issue correctly - the answer is:

To rerun a job and use the context, it must be rerun from the Workflows page of the CircleCI application. Jobs invoked using the Rebuild button on the Builds page will not use the context defined in the workflow.

Good to know. Thanks for the highlight

Got several feedback in my organization about this. Maybe some ux changes would make things more obvious :slight_smile: