Unverified Commit b872f136 authored by Kamal Dodiya's avatar Kamal Dodiya Committed by GitHub
Browse files

Review App Deployment post SSR migration (#517)

parent a9c499f7
Pipeline #170443 passed with stages
in 4 minutes and 44 seconds
......@@ -3,8 +3,12 @@
# master branch -> internal (Custom Downloads)
# master branch -> live
# include template to setup review app
include: '/gitlab-ci-templates/.setup-review-template.yaml'
# Define stages for the CI/CD pipeline
stages:
- setup
- test
- test_build_static
- build_docker_images
......@@ -356,6 +360,9 @@ Internal:HL:
Review:HX:
extends: .deploy-review
variables:
CONTAINER_IMAGE: ${CI_REGISTRY_IMAGE}:nginx-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_REF_SLUG}
CONTAINER_NODE_IMAGE: ${CI_REGISTRY_IMAGE}:node-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_REF_SLUG}
environment:
name: review/$CI_COMMIT_REF_SLUG
url: http://$CI_COMMIT_REF_SLUG.review.ensembl.org
......@@ -382,3 +389,11 @@ stop_review:
- dev
- master
- /^nodeploy\/.*$/
SetupReview:HX:
extends: .setup-review
environment:
name : wp-hx-dev-ing
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BEFORE_SHA == "0000000000000000000000000000000000000000"'
when: always
# Template to setup review app
# Create Service, Apply Ingress rules etc
.setup-review:
stage: setup
image: dockerhub.ebi.ac.uk/ensembl-web/deploy-tools:0.1
variables:
BROWSER_SERVICE_SLUG: dev
GENOME_SEARCH_SERVICE_SLUG: dev
THOAS_SERVICE_SLUG: dev
REFGET_SERVICE_SLUG: dev
HELP_DOCS_SERVICE_SLUG: dev
before_script:
- git clone https://gitlab.ebi.ac.uk/ensembl-web/ensembl-k8s-manifests.git
- git -C ensembl-k8s-manifests/ checkout wp-k8s-review
- cd ensembl-k8s-manifests/
# ensembl-client
- sed -i "s#<DEPLOYMENT_ENV>#${CI_COMMIT_REF_SLUG}#g" ensembl_client_nginx_service.yaml
- sed -i "s#<DEPLOYMENT_ENV>#${CI_COMMIT_REF_SLUG}#g" ensembl_client_nginx_ingress.yaml
- sed -i "s#<SUB_DOMAIN>#${CI_COMMIT_REF_SLUG}#g" ensembl_client_nginx_ingress.yaml
- sed -i "s#<DEPLOYMENT_ENV>#${CI_COMMIT_REF_SLUG}#g" ensembl_client_node_service.yaml
- sed -i "s#<DEPLOYMENT_ENV>#${CI_COMMIT_REF_SLUG}#g" ensembl_client_node_ingress.yaml
- sed -i "s#<SUB_DOMAIN>#${CI_COMMIT_REF_SLUG}#g" ensembl_client_node_ingress.yaml
- sed -i "s#<THOAS_SERVICE_SLUG>#${THOAS_SERVICE_SLUG}#g" ensembl_client_node_cm.yaml
- sed -i "s#<DEPLOYMENT_ENV>#${CI_COMMIT_REF_SLUG}#g" ensembl_client_node_cm.yaml
# ensembl-2020-server
- sed -i "s#<DEPLOYMENT_ENV>#${BROWSER_SERVICE_SLUG}#g" ensembl_server_service.yaml
- sed -i "s#<DEPLOYMENT_ENV>#${BROWSER_SERVICE_SLUG}#g" ensembl_server_ingress.yaml
- sed -i "s#<SUB_DOMAIN>#${CI_COMMIT_REF_SLUG}#g" ensembl_server_ingress.yaml
# ensembl-2020-genome-search
- sed -i "s#<DEPLOYMENT_ENV>#${GENOME_SEARCH_SERVICE_SLUG}#g" ensembl_genome_search_service.yaml
- sed -i "s#<DEPLOYMENT_ENV>#${GENOME_SEARCH_SERVICE_SLUG}#g" ensembl_genome_search_ingress.yaml
- sed -i "s#<SUB_DOMAIN>#${CI_COMMIT_REF_SLUG}#g" ensembl_genome_search_ingress.yaml
# ensembl-thoas
- sed -i "s#<DEPLOYMENT_ENV>#${THOAS_SERVICE_SLUG}#g" ensembl_thoas_service.yaml
- sed -i "s#<DEPLOYMENT_ENV>#${THOAS_SERVICE_SLUG}#g" ensembl_thoas_ingress.yaml
- sed -i "s#<SUB_DOMAIN>#${CI_COMMIT_REF_SLUG}#g" ensembl_thoas_ingress.yaml
# ensembl-refget
- sed -i "s#<DEPLOYMENT_ENV>#${REFGET_SERVICE_SLUG}#g" ensembl_refget_service.yaml
- sed -i "s#<DEPLOYMENT_ENV>#${REFGET_SERVICE_SLUG}#g" ensembl_refget_ingress.yaml
- sed -i "s#<SUB_DOMAIN>#${CI_COMMIT_REF_SLUG}#g" ensembl_refget_ingress.yaml
# ensembl-help-docs
- sed -i "s#<DEPLOYMENT_ENV>#${HELP_DOCS_SERVICE_SLUG}#g" ensembl_help_docs_service.yaml
- sed -i "s#<DEPLOYMENT_ENV>#${HELP_DOCS_SERVICE_SLUG}#g" ensembl_help_docs_ingress.yaml
- sed -i "s#<SUB_DOMAIN>#${CI_COMMIT_REF_SLUG}#g" ensembl_help_docs_ingress.yaml
script:
# ensembl-help-and-docs
- kubectl apply -f ensembl_help_docs_service.yaml
- kubectl apply -f ensembl_help_docs_ingress.yaml
# ensembl-refget
- kubectl apply -f ensembl_refget_service.yaml
- kubectl apply -f ensembl_refget_ingress.yaml
# ensembl-thoas
- kubectl apply -f ensembl_thoas_service.yaml
- kubectl apply -f ensembl_thoas_ingress.yaml
# ensembl-2020-server
- kubectl apply -f ensembl_server_service.yaml
- kubectl apply -f ensembl_server_ingress.yaml
# ensembl-2020-genome-search
- kubectl apply -f ensembl_genome_search_service.yaml
- kubectl apply -f ensembl_genome_search_ingress.yaml
# ensembl-client
- kubectl apply -f ensembl_client_nginx_service.yaml
- kubectl apply -f ensembl_client_nginx_ingress.yaml
- kubectl apply -f ensembl_client_node_service.yaml
- kubectl apply -f ensembl_client_node_ingress.yaml
- kubectl apply -f ensembl_client_node_cm.yaml
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