Shared environment variables missing on rebuild

Hey,

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

  workflows:
  version: 2
  build_test_and_deploy:
    jobs:
      - 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.

Regards

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: