Commit 6f119ff9 authored by rajkumar's avatar rajkumar
Browse files

allowing K8-master branch for prod deployment

parent 819ff404
......@@ -78,17 +78,31 @@ k8s-deploy-test:
- kubectl create secret docker-registry gitlab --docker-server=$CI_REGISTRY --docker-username=$DOCKER_USER --docker-password=$DOCKER_PASSWORD --docker-email=$DOCKER_EMAIL --namespace=ena-test
- kubectl apply -f Kubernetes-test-deploy.yaml --namespace=ena-test
#k8s-deploy-prod:
# image: dtzar/helm-kubectl
# stage: deploy
# only:
# refs:
# - master
# - tags
# variables:
# - $CI_COMMIT_BRANCH == "master"
# script:
# - sed -i s#%DOCKER_IMAGE%#$CI_REGISTRY_IMAGE\:$CI_COMMIT_TAG#g Kubernetes-prod-deploy.yaml
# - kubectl delete secret gitlab --namespace=ena-prod
# - kubectl create secret docker-registry gitlab --docker-server=$CI_REGISTRY --docker-username=$DOCKER_USER --docker-password=$DOCKER_PASSWORD --docker-email=$DOCKER_EMAIL --namespace=ena-prod
# - kubectl apply -f Kubernetes-prod-deploy.yaml --namespace=ena-prod
k8s-deploy-prod:
image: dtzar/helm-kubectl
stage: deploy
only:
refs:
- master
- tags
variables:
- $CI_COMMIT_BRANCH == "master"
- /^K8-master-.*$/
except:
- branches
- triggers
script:
- sed -i s#%DOCKER_IMAGE%#$CI_REGISTRY_IMAGE\:$CI_COMMIT_TAG#g Kubernetes-prod-deploy.yaml
- kubectl delete secret gitlab --namespace=ena-prod
- kubectl create secret docker-registry gitlab --docker-server=$CI_REGISTRY --docker-username=$DOCKER_USER --docker-password=$DOCKER_PASSWORD --docker-email=$DOCKER_EMAIL --namespace=ena-prod
- kubectl apply -f Kubernetes-prod-deploy.yaml --namespace=ena-prod
- sed -i s#%DOCKER_IMAGE%#$CI_REGISTRY_IMAGE\:$CI_COMMIT_TAG#g Kubernetes-test-deploy.yaml
- kubectl delete secret gitlab --namespace=ena-test
- kubectl create secret docker-registry gitlab --docker-server=$CI_REGISTRY --docker-username=$DOCKER_USER --docker-password=$DOCKER_PASSWORD --docker-email=$DOCKER_EMAIL --namespace=ena-test
- kubectl apply -f Kubernetes-test-deploy.yaml --namespace=ena-test
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