Commit dc269e07 authored by David Mendez's avatar David Mendez
Browse files

Add step to prepare config for staging

parent da89e5cd
...@@ -6,10 +6,15 @@ variables: ...@@ -6,10 +6,15 @@ variables:
RELEASE_IMAGE: $CI_REGISTRY/$REGISTRY_USER/$APPLICATION:$CI_BUILD_REF_NAME RELEASE_IMAGE: $CI_REGISTRY/$REGISTRY_USER/$APPLICATION:$CI_BUILD_REF_NAME
DOCKER_IMAGE: $CI_REGISTRY/$REGISTRY_USER/$APPLICATION DOCKER_IMAGE: $CI_REGISTRY/$REGISTRY_USER/$APPLICATION
DOCKER_DRIVER: overlay DOCKER_DRIVER: overlay
CONFIGS_FOLDER: run_config
# Config staging
CONFIG_STAGING_FILE_PATH: ${CONFIGS_FOLDER}/staging/.env
INGRESS_STAGING_FILE_PATH: ${CONFIGS_FOLDER}/staging/ingress.yml
stages: stages:
- build - build
- test - test
- prepare_config
# - deploy # - deploy
build-dev: build-dev:
...@@ -54,10 +59,33 @@ unit-tests: ...@@ -54,10 +59,33 @@ unit-tests:
script: script:
- echo "ToDo UNIT TESTS" - echo "ToDo UNIT TESTS"
prepare_config_staging:
stage: prepare_config
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}
tags:
- docker
artifacts:
paths:
- ${CONFIG_STAGING_FILE_PATH}
- ${INGRESS_STAGING_FILE_PATH}
# deploy-dev-hx: # deploy-dev-hx:
# image: # image:
# name: lachlanevenson/k8s-kubectl:latest # name: lachlanevenson/k8s-kubectl:latest
# entrypoint: ["/bin/sh", "-c"] # entrypoint: ["/bin/sh", "-c"]
# only:
# - dev
# stage: deploy # stage: deploy
# script: # script:
# - echo $KUBE_URL_HX # - echo $KUBE_URL_HX
...@@ -66,13 +94,18 @@ unit-tests: ...@@ -66,13 +94,18 @@ unit-tests:
# - kubectl config set-credentials ${KUBE_USER_HX} --token="${KUBE_TOKEN_HX}" # - kubectl config set-credentials ${KUBE_USER_HX} --token="${KUBE_TOKEN_HX}"
# - kubectl config set-context ${KUBE_NAMESPACE_DEV} --cluster=${KUBE_CLUS_NAME_HX} --user=${KUBE_USER_HX} # - kubectl config set-context ${KUBE_NAMESPACE_DEV} --cluster=${KUBE_CLUS_NAME_HX} --user=${KUBE_USER_HX}
# - kubectl config use-context ${KUBE_NAMESPACE_DEV} # - kubectl config use-context ${KUBE_NAMESPACE_DEV}
# - kubectl create secret generic ${RUN_CONFIG_SECRET_NAME_STAGING} --from-file=RUN_CONFIG.yml=${CONFIG_STAGING_FILE_PATH} -o yaml -n ${CHEMBL_NS_STAGING} --dry-run=client | kubectl replace -f -
# - kubectl create secret generic ${GUNICORN_CONFIG_SECRET_NAME_STAGING} --from-file=GUNICORN_CONFIG.py=${CONFIG_GUNICORN_STAGING_FILE_PATH} -o yaml -n ${CHEMBL_NS_STAGING} --dry-run=client | kubectl replace -f -
# - cat ${CONFIG_STAGING_FILE_PATH}
# - cat ${CONFIG_GUNICORN_STAGING_FILE_PATH}
# - echo ${KUBE_NAMESPACE_DEV} ${KUBE_URL_HH} ${KUBE_CLUS_NAME_HX} ${KUBE_USER_HX} # - echo ${KUBE_NAMESPACE_DEV} ${KUBE_URL_HH} ${KUBE_CLUS_NAME_HX} ${KUBE_USER_HX}
# - kubectl get pods -n ${KUBE_NAMESPACE_DEV} # - kubectl get pods -n ${KUBE_NAMESPACE_DEV}
# - sed -i "s~<VERSION>~${CI_COMMIT_SHORT_SHA}~" k8s-deployment.yml # - sed -i "s~<VERSION>~${CI_COMMIT_SHORT_SHA}~" k8s-deployment.yml
# - sed -i "s~<DOCKER_IMAGE>~${DOCKER_IMAGE}~" k8s-deployment.yml # - sed -i "s~<DOCKER_IMAGE>~${DOCKER_IMAGE}~" k8s-deployment.yml
# - kubectl apply -n ${KUBE_NAMESPACE_DEV} -f k8s-deployment.yml # - kubectl apply -n ${KUBE_NAMESPACE_DEV} -f k8s-deployment.yml
# only:
# - dev
# deploy-dev-hh: # deploy-dev-hh:
# image: # image:
......
require('dotenv').config({ path: process.env.ENV_FILE_PATH })
export default { export default {
mode: 'universal', mode: 'universal',
router: { router: {
base: '/chembl/lina-web' base: '/chembl/lina_web'
}, },
env: { env: {
baseUrl: process.env.BASE_URL || 'http://localhost:3000', baseUrl: process.env.BASE_URL || 'http://localhost:3000',
......
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