Update .gitlab-ci.yml

This commit is contained in:
chenwj113 2023-02-16 13:58:30 +08:00
parent 6b2dce4811
commit efefff5bfd
1 changed files with 2 additions and 2 deletions

View File

@ -34,8 +34,8 @@ deploy-staging:dep:
- master
script:
- echo "===== start deploy =========="
- echo $CI_COMMIT_TAG
- if [[ $CI_COMMIT_TAG == 'dev' ]] && [[ "$(kubectl get deployment -n $K8S_NS | grep $DEPLOYMENT_NAME | awk '{print $1}')" ]]; then
- echo $CI_COMMIT_BRANCH
- if [[ $CI_COMMIT_BRANCH == 'master' ]] && [[ "$(kubectl get deployment -n $K8S_NS | grep $DEPLOYMENT_NAME | awk '{print $1}')" ]]; then
- kubectl rollout restart deployment $DEPLOYMENT_NAME -n $K8S_NS
- fi
- echo "===== end deploy !!!!!======="