alair 4 månader sedan
förälder
incheckning
a5def580fd
2 ändrade filer med 4 tillägg och 2 borttagningar
  1. 2 1
      Jenkinsfile-admin
  2. 2 1
      Jenkinsfile-ui

+ 2 - 1
Jenkinsfile-admin

@@ -45,7 +45,8 @@ pipeline{
         }
         }
         stage('远程执行k8s-master的kubectl命令') {
         stage('远程执行k8s-master的kubectl命令') {
             steps {
             steps {
-                sh '''ssh root@192.168.0.3 kubectl apply -f /usr/local/k8s/ruoyi-admin-deploy.yaml'''
+                sh '''ssh root@192.168.0.3 kubectl apply -f /usr/local/k8s/ruoyi-admin-deploy.yaml
+                ssh root@192.168.0.3 kubectl rollout restart deployment ruoyi-admin -n ruoyi'''
             }
             }
         }
         }
     }
     }

+ 2 - 1
Jenkinsfile-ui

@@ -53,7 +53,8 @@ pipeline{
         }
         }
         stage('远程执行k8s-master的kubectl命令') {
         stage('远程执行k8s-master的kubectl命令') {
             steps {
             steps {
-                sh '''ssh root@192.168.0.3 kubectl apply -f /usr/local/k8s/ruoyi-ui-deploy.yaml'''
+                sh '''ssh root@192.168.0.3 kubectl apply -f /usr/local/k8s/ruoyi-ui-deploy.yaml
+                ssh root@192.168.0.3 kubectl rollout restart deployment ruoyi-ui -n ruoyi'''
             }
             }
         }
         }
     }
     }