I’ve been trying to figure out a way to get my pipeline working for quite sometime, but no luck.
Basically I am using docker-compose to build the environment but due to be importing some private npm packages on my project, I need to pass the environment variable as an argument, but I can’t find a way to get it working.
Here is an example of the code and plugins I am trying to use.
seek-oss/aws-sm exposes the secret for me as an environment variable, but on docker-compose I need to use as an argument the NPM_TOKEN environment variable.
@cwmaier-grapl’s suggestion is correct, you’ll need to ensure that the values exposed in the seek-oss/aws-sm plugin are available to your containers using the env key in the example they provided there.
…I’ve also ended up taking a whacky approach in Dockerfiles in the past, passing ARGs to ENVs. It pickles my noodle every time I have to think about it, but with enough time I can convince myself it makes sense. It goes something like:
ARG NPM_TOKEN
ENV NPM_TOKEN=$NPM_TOKEN
Don’t know if this will help, but give it a go - it could be useful one day anyway!