Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
enasequence
webin-portal
Commits
909df5ae
Commit
909df5ae
authored
Mar 19, 2021
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
38 deletions
+11
-38
.gitlab-ci.yml
.gitlab-ci.yml
+11
-38
No files found.
.gitlab-ci.yml
View file @
909df5ae
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment