Skip to content
Snippets Groups Projects
Commit dc1b94f7 authored by Andrew Kapuscinski's avatar Andrew Kapuscinski
Browse files

using .env file messed with the env variables in the CI, reverting to old way...

using .env file messed with the env variables in the CI, reverting to old way of doing things in a more readable fashion
parent f983f115
No related branches found
Tags test_0.0.1 test_0.0.2
1 merge request!265using .env file messed with the env variables in the CI, reverting to old way...
Pipeline #1805 failed
......@@ -280,16 +280,15 @@ pages:
deploy:
stage: deploy
script:
- export
# Docker doesn't allow variable interpolation when declaring Docker Secret names
# This sed command finds and replaces "dsoc_ENV_secrets:" with "dsoc_${DEPLOY_ENV}_secrets:"
- sed -i "s/dsoc_ENV_secrets:/dsoc_${DEPLOY_ENV}_secrets:/g" docker-compose.dev.yml
# setting env variables with .env https://docs.docker.com/compose/environment-variables/
- echo "ENV=$DEPLOY_ENV" >> .env
- echo "TAG=$IMAGE_TAG" >> .env
- echo "DL_HOST=$DL_HOST" >> .env
- echo "ENV_HOST=$ENV_HOST" >> .env
- docker stack deploy --compose-file docker-compose.dev.yml workspaces-${DEPLOY_ENV}
- |
ENV=$DEPLOY_ENV \
TAG=$IMAGE_TAG \
DL_HOST=$DL_HOST \
ENV_HOST=$ENV_HOST \
docker stack deploy --compose-file docker-compose.dev.yml workspaces-${DEPLOY_ENV}
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
variables:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment