Enviroment variables available in multiple containers

Hey I’ve been trying to get a CI workflow setup, but have run into a snag.

We have a setup where a primary container where the tests are run is communicating with multiple services, and all containers need access to secrets set via the UI envars.

At the moment, just the primary container seems to have access to them, which leads me to think I’m approaching this problem wrong, how can I get those secrets into the other containers, or is there another way I should be approaching this?


version: 2.1
      - image: primaryimage
      - image: secondaryservice # needs secrets
      - image: tertiaryservice  # needs secrets
    working_directory: /usr/local/src/app
      - run: run some tests

Not sure how I missed this topic in my search, but seems like this isn’t possible and requires some interesting workarounds

Hello @rssk! Welcome to our CircleCI Community!

Yes, as you discovered, my colleague @mike outlines how this is not possible in a multi-docker build such as you are attempting. I’m not sure if the shared workarounds would suit your particular use-case. The blog article was the most streamlined suggestion we could provide.

I just wanted to chime in here and validate your findings! Again, welcome!