Quellcode durchsuchen

добавил rotation

Tomishinets Vladimir vor 3 Jahren
Ursprung
Commit
6294c67830
2 geänderte Dateien mit 8 neuen und 2 gelöschten Zeilen
  1. 1 0
      Jenkinsfile
  2. 7 2
      Jenkinsfile-prod

+ 1 - 0
Jenkinsfile

@@ -4,6 +4,7 @@ pipeline {
   }
   options {
     disableConcurrentBuilds()
+    buildDiscarder logRotator(numToKeepStr: '20')
     timeout(time: 20, unit: 'MINUTES')
   }
   environment {

+ 7 - 2
Jenkinsfile-prod

@@ -13,6 +13,11 @@ pipeline {
   agent {
     label "swarm"
   }
+  options {
+    disableConcurrentBuilds()
+    buildDiscarder logRotator(numToKeepStr: '20')
+    timeout(time: 20, unit: 'MINUTES')
+  }
   environment {
     DOCKER_IMAGE='iru/node'
     DOCKER_CERT_PATH='/run/secrets/swarm'
@@ -115,7 +120,7 @@ pipeline {
                 sh "DOCKER_HOST=${DHOST} docker service rollback ${item}"
                 throw err
               }
-            }  
+            }
           } else {
               try{
                 echo "Updating ${SERVICE}"
@@ -127,7 +132,7 @@ pipeline {
                 throw err
               }
           }
-          
+
         }
       }
     }