Commit cc74f38b authored by JooHan Hong's avatar JooHan Hong

k8s ci_cd update

parent 02eca8e3
Pipeline #5257 passed with stages
in 44 seconds
...@@ -123,7 +123,7 @@ push: ...@@ -123,7 +123,7 @@ push:
only: only:
- deploy - deploy
script: script:
- docker login -u juhanida21@nate.com -p $GITLAB_TOKEN registry.hongsnet.net - /usr/bin/docker login -u juhanida21@nate.com -p $GITLAB_TOKEN registry.hongsnet.net
- /usr/bin/docker tag hongsnet-dev:$BUILD_SHA_RESULT registry.hongsnet.net/joohan.hong/docker/hongsnet:$BUILD_VERSION - /usr/bin/docker tag hongsnet-dev:$BUILD_SHA_RESULT registry.hongsnet.net/joohan.hong/docker/hongsnet:$BUILD_VERSION
- /usr/bin/docker push registry.hongsnet.net/joohan.hong/docker/hongsnet:$BUILD_VERSION - /usr/bin/docker push registry.hongsnet.net/joohan.hong/docker/hongsnet:$BUILD_VERSION
tags: tags:
...@@ -134,10 +134,10 @@ deploy: ...@@ -134,10 +134,10 @@ deploy:
only: only:
- deploy - deploy
script: script:
- docker login -u juhanida21@nate.com -p $GITLAB_TOKEN registry.hongsnet.net - /usr/bin/docker login -u juhanida21@nate.com -p $GITLAB_TOKEN registry.hongsnet.net
- kubectl set image deployment/hongsnet-web hongsnet-web=registry.hongsnet.net/joohan.hong/docker/hongsnet:$BUILD_VERSION - /usr/bin/kubectl set image deployment/hongsnet-web hongsnet-web=registry.hongsnet.net/joohan.hong/docker/hongsnet:$BUILD_VERSION
- kubectl rollout history deployment/hongsnet-web - /usr/bin/kubectl rollout history deployment/hongsnet-web
- kubectl rollout status deployment/hongsnet-web - /usr/bin/kubectl rollout status deployment/hongsnet-web
tags: tags:
- backup - backup
...@@ -148,7 +148,7 @@ build: ...@@ -148,7 +148,7 @@ build:
script: script:
- cd /DATA/DOCKERS/hongsnet-dev; docker-compose down - cd /DATA/DOCKERS/hongsnet-dev; docker-compose down
- cd ${BUILD_IMAGE} - cd ${BUILD_IMAGE}
- docker build --rm -t hongsnet-dev:$BUILD_SHA . - /usr/bin/docker build --rm -t hongsnet-dev:$BUILD_SHA .
- (if [[ `docker images -f "dangling=true" -q` != "" ]]; then docker rmi $(docker images -f "dangling=true" -q); fi); - (if [[ `docker images -f "dangling=true" -q` != "" ]]; then docker rmi $(docker images -f "dangling=true" -q); fi);
- (rm -rf /DATA/DOCKERS/hongsnet-dev/docker-compose.yml; cp -rf /DATA/DOCKERS/hongsnet-dev/docker-compose.yml_init /DATA/DOCKERS/hongsnet-dev/docker-compose.yml); - (rm -rf /DATA/DOCKERS/hongsnet-dev/docker-compose.yml; cp -rf /DATA/DOCKERS/hongsnet-dev/docker-compose.yml_init /DATA/DOCKERS/hongsnet-dev/docker-compose.yml);
- (sed 's/init/$BUILD_SHA/g' -i /DATA/DOCKERS/hongsnet-dev/docker-compose.yml); - (sed 's/init/$BUILD_SHA/g' -i /DATA/DOCKERS/hongsnet-dev/docker-compose.yml);
...@@ -292,3 +292,7 @@ imagePullPolicy: IfNotPresent ...@@ -292,3 +292,7 @@ imagePullPolicy: IfNotPresent
![container_dev](./images/k8s-dashboard-ci_cd.png) ![container_dev](./images/k8s-dashboard-ci_cd.png)
- **Pod Update 확인**
![container_update](./images/k8s-dashboard-console.png)
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