Commit 92dc8e86 authored by David Mendez's avatar David Mendez

Add step to prepare config for staging

parent 896a7c56
Pipeline #93234 failed with stages
in 3 minutes and 21 seconds
......@@ -11,7 +11,6 @@ variables:
# Config staging
CONFIG_STAGING_FILE_PATH: ${CONFIGS_FOLDER}/staging.yml
CONFIG_GUNICORN_STAGING_FILE_PATH: ${CONFIGS_FOLDER}/staging.gunicorn.config.py
INGRESS_STAGING_FILE_PATH: ${CONFIGS_FOLDER}/ingress-staging.yml
AUTOSCALER_STAGING_FILE_PATH: ${CONFIGS_FOLDER}/autoscaler-staging.yml
# Config prod_hx
CONFIG_PROD_HX_FILE_PATH: ${CONFIGS_FOLDER}/prod_hx.yml
......@@ -33,7 +32,7 @@ stages:
- build
- prepare_config_tests
- test_and_qa
# - prepare_config_staging
- prepare_config_staging
# - deploy_to_staging
# - test_staging
# - prepare_config_hx
......@@ -108,28 +107,27 @@ unit_tests:
script:
- set -x
- CONFIG_FILE_PATH=${CONFIG_UNIT_TESTS_FILE_PATH} python -m unittest
#
### ----------------------------------------------------------------------------------------------------------------------
### Deployment to staging
### ----------------------------------------------------------------------------------------------------------------------
#prepare_config_staging:
# stage: prepare_config_staging
# image:
# name: alpine/git
# entrypoint: ["/bin/sh", "-c"]
# only:
# - staging
# 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:
# paths:
# - ${CONFIG_STAGING_FILE_PATH}
# - ${CONFIG_GUNICORN_STAGING_FILE_PATH}
# - ${INGRESS_STAGING_FILE_PATH}
# - ${AUTOSCALER_STAGING_FILE_PATH}
## ----------------------------------------------------------------------------------------------------------------------
## Deployment to staging
## ----------------------------------------------------------------------------------------------------------------------
prepare_config_staging:
stage: prepare_config_staging
image:
name: alpine/git
entrypoint: ["/bin/sh", "-c"]
only:
- staging
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:
paths:
- ${CONFIG_STAGING_FILE_PATH}
- ${CONFIG_GUNICORN_STAGING_FILE_PATH}
- ${AUTOSCALER_STAGING_FILE_PATH}
#
#deploy_to_staging:
# stage: deploy_to_staging
......
......@@ -27,3 +27,6 @@ ENTRYPOINT FLASK_APP=app flask run --host=0.0.0.0
FROM base AS production-server
ENTRYPOINT gunicorn wsgi:FLASK_APP -c ${GUNICORN_CONFIG_FILE_PATH}
FROM base AS task-status-daemon
ENTRYPOINT /app/run_daemon.sh
......@@ -15,6 +15,15 @@ services:
- CONFIG_FILE_PATH=/app/config.yml
ports:
- "5000:5000"
task-status-daemon-dev:
build:
context: .
target: task-status-daemon
args:
<<: *build_args
image: chembl/es-subset-generator-tasks-daemon:dev
environment:
- CONFIG_FILE_PATH=/app/config.yml # make sure to copy the config.yml file when using this
es-subset-generator-prod:
build:
context: .
......@@ -23,4 +32,11 @@ services:
<<: *build_args
image: "${SERVER_IMAGE_TAG:-chembl/es-subset-generator:prod}"
ports:
- "5000:5000"
\ No newline at end of file
- "5000:5000"
task-status-daemon-prod:
build:
context: .
target: task-status-daemon
args:
<<: *build_args
image: "${STATUS_DAEMON_IMAGE_TAG:-chembl/es-subset-generator-tasks-daemon:prod}"
\ No newline at end of file
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