Commit 6bcad299 authored by David Mendez's avatar David Mendez

Set up configs for deployment in one step

parent 634168af
Pipeline #93457 failed with stages
in 4 minutes and 2 seconds
......@@ -31,12 +31,11 @@ services:
stages:
- build
- prepare_config_tests
- prepare_config_unit_tests
- test_and_qa
- prepare_config_staging
- prepare_config_deployments
- deploy_to_staging
- test_staging
- prepare_config_hx
- deploy_to_prod_hx
- test_prod_hx
# - prepare_config_hh
......@@ -99,8 +98,8 @@ pylint:
### ---------------------------------------------------------------------------------------------------------------------
### Tests
### ---------------------------------------------------------------------------------------------------------------------
prepare_config_tests:
stage: prepare_config_tests
prepare_config_unit_tests:
stage: prepare_config_unit_tests
image:
name: alpine/git
entrypoint: ["/bin/sh", "-c"]
......@@ -128,16 +127,18 @@ unit_tests:
## ----------------------------------------------------------------------------------------------------------------------
## Deployment to staging
## ----------------------------------------------------------------------------------------------------------------------
prepare_config_staging:
stage: prepare_config_staging
prepare_config_deployments:
stage: prepare_config_deployments
image:
name: alpine/git
entrypoint: ["/bin/sh", "-c"]
only:
- staging
- master
except:
- schedules
script:
- set -x
- rm -rf ${CONFIGS_FOLDER} || true
- mkdir -p ${CONFIGS_FOLDER}
- git clone https://${CONFIG_DEPLOY_GITLAB_USERNAME}:${CONFIG_DEPLOY_GITLAB_TOKEN}@${CONFIGURATIONS_REPO} ${CONFIGS_FOLDER}
artifacts:
......@@ -145,6 +146,9 @@ prepare_config_staging:
- ${CONFIG_STAGING_FILE_PATH}
- ${CONFIG_GUNICORN_STAGING_FILE_PATH}
- ${AUTOSCALER_STAGING_FILE_PATH}
- ${CONFIG_PROD_HX_FILE_PATH}
- ${CONFIG_GUNICORN_PROD_HX_FILE_PATH}
- ${AUTOSCALER_PROD_HX_FILE_PATH}
deploy_to_staging:
stage: deploy_to_staging
......@@ -206,28 +210,9 @@ functional_tests:
- set -x
- functional_tests/run_functional_tests.py ${SERVER_URL_STAGING}
## ----------------------------------------------------------------------------------------------------------------------
## ---------------------------------------------------------------------------------------------------------------------
## Deployment to prod hx
## ----------------------------------------------------------------------------------------------------------------------
prepare_config_prod_hx:
stage: prepare_config_hx
image:
name: alpine/git
entrypoint: ["/bin/sh", "-c"]
only:
- master
except:
- schedules
script:
- rm -rf ${CONFIGS_FOLDER} || true
- mkdir -p ${CONFIGS_FOLDER}
- git clone https://${CONFIG_DEPLOY_GITLAB_USERNAME}:${CONFIG_DEPLOY_GITLAB_TOKEN}@${CONFIGURATIONS_REPO} ${CONFIGS_FOLDER}
artifacts:
paths:
- ${CONFIG_PROD_HX_FILE_PATH}
- ${CONFIG_GUNICORN_PROD_HX_FILE_PATH}
- ${AUTOSCALER_PROD_HX_FILE_PATH}
## ---------------------------------------------------------------------------------------------------------------------
deploy_to_prod_hx:
stage: deploy_to_prod_hx
image:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment