Use CI/CD variables for .env files
This commit is contained in:
parent
df5ac6c804
commit
5388345b41
|
@ -78,8 +78,8 @@ test-api:
|
||||||
|
|
||||||
- docker login -u $CI_REGISTRY_USER --password $CI_JOB_TOKEN $CI_REGISTRY
|
- docker login -u $CI_REGISTRY_USER --password $CI_JOB_TOKEN $CI_REGISTRY
|
||||||
|
|
||||||
- docker compose -f docker-compose.yml --env-file .env.dev --profile api pull
|
- docker compose -f docker-compose.yml --env-file $ENV_DEV --profile api pull
|
||||||
- docker compose -f docker-compose.yml --env-file .env.dev --profile api up --abort-on-container-exit
|
- docker compose -f docker-compose.yml --env-file $ENV_DEV --profile api up --abort-on-container-exit
|
||||||
- docker cp foodtruckers_api:/usr/src/app/coverage.xml .
|
- docker cp foodtruckers_api:/usr/src/app/coverage.xml .
|
||||||
- docker cp foodtruckers_api:/usr/src/app/report.xml .
|
- docker cp foodtruckers_api:/usr/src/app/report.xml .
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -105,8 +105,8 @@ test-integration:
|
||||||
- export API_IMAGE=$API_TEST_IMAGE_NAME
|
- export API_IMAGE=$API_TEST_IMAGE_NAME
|
||||||
- export CLIENT_IMAGE=$CLIENT_TEST_IMAGE_NAME
|
- export CLIENT_IMAGE=$CLIENT_TEST_IMAGE_NAME
|
||||||
- export TEST_TARGET=INTEGRATION
|
- export TEST_TARGET=INTEGRATION
|
||||||
- docker compose -f docker-compose.yml --env-file .env.dev --profile all pull
|
- docker compose -f docker-compose.yml --env-file $ENV_DEV --profile all pull
|
||||||
- docker compose -f docker-compose.yml --env-file .env.dev --profile all up --abort-on-container-exit
|
- docker compose -f docker-compose.yml --env-file $ENV_DEV --profile all up --abort-on-container-exit
|
||||||
needs:
|
needs:
|
||||||
- job: test-api
|
- job: test-api
|
||||||
- job: build-client
|
- job: build-client
|
||||||
|
@ -145,10 +145,10 @@ deploy-prod:
|
||||||
|
|
||||||
- docker login -u $DOCKER_HUB_USER --password $DOCKER_HUB_PASS
|
- docker login -u $DOCKER_HUB_USER --password $DOCKER_HUB_PASS
|
||||||
|
|
||||||
- docker compose -f docker-compose.yml --profile all --env-file .env.prod stop
|
- docker compose -f docker-compose.yml --profile all --env-file $ENV_PROD stop
|
||||||
- docker compose -f docker-compose.yml --profile all --env-file .env.prod rm
|
- docker compose -f docker-compose.yml --profile all --env-file $ENV_PROD rm
|
||||||
- docker compose -f docker-compose.yml --profile all --env-file .env.prod pull
|
- docker compose -f docker-compose.yml --profile all --env-file $ENV_PROD pull
|
||||||
- docker compose -f docker-compose.yml --profile all --env-file .env.prod up -d
|
- docker compose -f docker-compose.yml --profile all --env-file $ENV_PROD up -d
|
||||||
needs:
|
needs:
|
||||||
- job: deliver-dockerhub
|
- job: deliver-dockerhub
|
||||||
- job: preparation
|
- job: preparation
|
||||||
|
|
Loading…
Reference in New Issue