I have a list env variables in .env file which I set across multiple CI tasks. I can do source my.env
to set these. But how can I pass these when I’m using docker service images?
test_sit
image: registery.com/sdc/my-image:2.5
script:
- source my.env
services:
- $DOCKER_IMAGE_URL:$CI_BUILD_REF
I have tried setting them manually within script as, but it does not like it unless I have variables section in the task. currently i have duplicate each env variable just for this task.
Can someone please advise?