Browse Source

добавил rotation

Tomishinets Vladimir 3 years ago
parent
commit
6294c67830
2 changed files with 8 additions and 2 deletions
  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
               }
           }
-          
+
         }
       }
     }