I am using circle ci to build couple of docker images. The docker image rely on -build-arg my_var=val
. I have modified my circleci job to handle this arg i.e.,
build_image:
docker:
- image: google/cloud-sdk:latestare run
steps:
- run: docker build --build-arg my_var=${my_var} -t .
Now the problem is that how would i pass my_var
from workflow
to the job. I used command
but i think its illegal there.
workflows:
version: 2
build-image-and-deploy:
jobs:
- build_image:
command: |
echo "export my_var=val" >> $BASH_ENV