alair 4 mesiacov pred
rodič
commit
9f152ae237

+ 2 - 1
Jenkinsfile

@@ -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/pipeline.yaml'
+                sh '''ssh root@192.168.0.3 kubectl apply -f /usr/local/k8s/pipeline.yaml
+                ssh root@192.168.0.3 kubectl rollout restart deployment pipeline -n test'''
             }
             }
         }
         }
     }
     }

+ 1 - 1
src/main/java/com/autumn/mytest/controller/TestController.java

@@ -8,6 +8,6 @@ public class TestController {
 
 
     @GetMapping("/test")
     @GetMapping("/test")
     public String test() {
     public String test() {
-        return "Hello Jenkins! - v1.0.0";
+        return "Hello Jenkins! - v2.0.0";
     }
     }
 }
 }