فهرست منبع

Obtiene último id de trabajo con éxito

Celestino Rey 10 ماه پیش
والد
کامیت
adabed86fa
1فایلهای تغییر یافته به همراه10 افزوده شده و 0 حذف شده
  1. 10 0
      Jenkinsfile

+ 10 - 0
Jenkinsfile

@@ -26,6 +26,16 @@ pipeline {
   }
   
   stages {
+      stage("get build status"){            
+        steps {                
+            script {                    
+                def jobName = Jenkins.instance.getItem("test-job")
+                echo "${jobName.getLastSuccessfulBuild()}"
+                echo "${jobName.getLastFailedBuild()}"
+                echo "${jobName.getLastBuild()}"
+            }
+        }
+    }
     stage('Crea las PVC') {
       when {
         expression { params.claims}