Commit 46cfdcab authored by Kamal Dodiya's avatar Kamal Dodiya

Deploy review apps

parents 83f82f96 0f582506
Pipeline #85736 failed with stage
in 11 seconds
stages:
- deploy
.deploy:
stage: deploy
image: dockerhub.ebi.ac.uk/kamal/deploy-tools:0.2
before_script:
- SERVICE_TAG=`yq r values.yaml fe-services.client-service`
- if [ "${SERVICE_TAG}" == "<BRANCH_NAME>" ] ; then echo "Please sepcify <BRANCH_NAME> for FE services" ; exit 1 ; fi
- SERVICE_TAG="${SERVICE_TAG//[[:space:]]/}"
- SERVICE_SLUG="${SERVICE_TAG//[^[:alnum:]]/-}"
- BROWSER_SERVICE_TAG=`yq r values.yaml be-services.browser-service`
- BROWSER_SERVICE_TAG="${BROWSER_SERVICE_TAG//[[:space:]]/}"
- BROWSER_SERVICE_SLUG="${BROWSER_SERVICE_TAG//[^[:alnum:]]/-}"
- GENOME_SEARCH_SERVICE_TAG=`yq r values.yaml be-services.genome-search-service`
- GENOME_SEARCH_SERVICE_TAG="${GENOME_SEARCH_SERVICE_TAG//[[:space:]]/}"
- GENOME_SEARCH_SERVICE_SLUG="${GENOME_SEARCH_SERVICE_TAG//[^[:alnum:]]/-}"
- sed -i "s#<DEPLOYMENT_ENV>#${SERVICE_SLUG}#g" ensembl_client_service_cluster.yaml
- sed -i "s#<DEPLOYMENT_ENV>#${SERVICE_SLUG}#g" ensembl_client_ingress.yaml
- sed -i "s#<SUB_DOMAIN>#${SERVICE_SLUG}#g" ensembl_client_ingress.yaml
- 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>#${SERVICE_SLUG}#g" ensembl_server_ingress.yaml
- 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>#${SERVICE_SLUG}#g" ensembl_genome_search_ingress.yaml
script:
- kubectl apply -f ensembl_server_service.yaml
- kubectl apply -f ensembl_server_ingress.yaml
- kubectl apply -f ensembl_genome_search_service.yaml
- kubectl apply -f ensembl_genome_search_ingress.yaml
- kubectl apply -f ensembl_client_service_cluster.yaml
- kubectl apply -f ensembl_client_ingress.yaml
Setup-2020:
extends: .deploy
environment:
name : wp-hx-dev-ing
except:
- dev
- master
\ No newline at end of file
......@@ -25,7 +25,6 @@ stages:
- 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>#${SERVICE_SLUG}#g" ensembl_genome_search_ingress.yaml
script:
- kubectl apply -f ensembl_server_service.yaml
- kubectl apply -f ensembl_server_ingress.yaml
......
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ensembl-genome-search-<DEPLOYMENT_ENV>-ingress
name: ensembl-genome-search-<SUB_DOMAIN>-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /api/$2
spec:
......
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ensembl-server-<DEPLOYMENT_ENV>-ingress
name: ensembl-server-<SUB_DOMAIN>-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /browser/$2
spec:
......
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