Commit 909df5ae authored by rajkumar's avatar rajkumar
Browse files

Updating prod build and deployment to work from master branch

parent 95e5be7e
Pipeline #139622 passed with stages
in 4 minutes and 30 seconds
......@@ -37,32 +37,19 @@ docker-build-test:
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --build-arg configuration=test --build-arg basePath=/ena/submit/webin/ .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
#docker-build-prod:
# stage: package
# only:
# refs:
# - master
# - tags
# variables:
# - $CI_COMMIT_BRANCH == "master"
# script:
# - docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
# - docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --build-arg configuration=production .
# - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
docker-build-prod:
stage: package
only:
- /^K8-master-.*$/
except:
- branches
- triggers
refs:
- master
- tags
variables:
- $CI_COMMIT_BRANCH == "master"
script:
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --build-arg configuration=production --build-arg basePath=/ena/submit/webin/ .
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --build-arg configuration=production .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
k8s-deploy-dev:
image: dtzar/helm-kubectl
stage: deploy
......@@ -91,29 +78,15 @@ 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:
- /^K8-master-.*$/
except:
- branches
- triggers
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
......
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