Skip to content
Snippets Groups Projects
Commit 4dc3946d authored by michael.minelli's avatar michael.minelli
Browse files

CI/CD => modify deployment for dotenv-vault

parent 78d3657a
No related branches found
No related tags found
No related merge requests found
...@@ -3,22 +3,29 @@ variables: ...@@ -3,22 +3,29 @@ variables:
GIT_SUBMODULE_FORCE_HTTPS: "true" GIT_SUBMODULE_FORCE_HTTPS: "true"
SECURE_FILES_DOWNLOAD_PATH: './' SECURE_FILES_DOWNLOAD_PATH: './'
stages: stages:
- deploy - deploy
deploy: deploy:
image: docker:latest image: docker:latest
stage: deploy stage: deploy
tags: tags:
- dojo_backend_deployment - dojo_backend_deployment
script: script:
- API_VERSION=$(jq -r .version API/ExpressAPI/package.json) - cd "API/ExpressAPI"
# Download secure files
- curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash # Get API version
# Prepare environment - API_VERSION=$(jq -r .version package.json)
- mv env_$API_VERSION .env
- cp .env API/.env # Get env file
- |
echo "Decrypt production env vars" # Do not remove this line because it is used for hide the production key from the ci/cd console
npx dotenv-vault local decrypt "${DOTENV_PROD_KEY}" > ../.env
# Deploy # Deploy
- cd ../../
- ./infra --run - ./infra --run
only: rules:
- main - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment