]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
CI: Increase clone depth and do better cleanup
authorGeorge Joseph <gjoseph@digium.com>
Tue, 19 Nov 2019 14:51:56 +0000 (07:51 -0700)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 19 Nov 2019 16:58:58 +0000 (11:58 -0500)
The original clone depth of 10 was causing the need to rebase
changes whose parent was older than the 10 commits.  The clone
depth has been increased to 100.

Workspace cleanup was only happening for successful builds which
wasn't enough to keep the 8G workspace in-memory drives on the
docker slaves from filling up.  Now the workspaces are cleaned up
after every build regardless of success/failure.  If you need to
preserve builds temporarily, you can log into Jenkins/Manage
Jenkins/Configure System and change the CLEANUP_WS_* environment
variable for the job type you're troubleshooting to "FALSE".

Change-Id: I0d7366e87cea714e5dbc9488caf718802fce75ca

tests/CI/gates.jenkinsfile
tests/CI/periodics-daily.jenkinsfile
tests/CI/ref_debug.jenkinsfile
tests/CI/unittests.jenkinsfile

index 82ef3434989bba5db46ab634a468e26304cfad18..284b0feab398f7d6ec704d6d022ba6b8bc3779ba 100644 (file)
@@ -115,7 +115,7 @@ pipeline {
                                                                        [$class: 'CloneOption',
                                                                                honorRefspec: true,
                                                                                noTags: true,
-                                                                               depth: 10,
+                                                                               depth: 100,
                                                                                shallow: true
                                                                        ],
                                                                        [$class: 'PruneStaleBranch'],
@@ -203,7 +203,7 @@ pipeline {
                                                                                                [$class: 'RelativeTargetDirectory', relativeTargetDir: groupDir],
                                                                                                [$class: 'CloneOption',
                                                                                                        noTags: true,
-                                                                                                       depth: 10,
+                                                                                                       depth: 100,
                                                                                                        honorRefspec: true,
                                                                                                        shallow: true
                                                                                                ],
@@ -240,7 +240,9 @@ pipeline {
        }
        post {
                cleanup {
-            cleanWs deleteDirs: true, notFailBuild: true
+                       if (env.CLEANUP_WS_GATES.toBoolean()) {
+                               cleanWs deleteDirs: true, notFailBuild: false
+                       }
                }
                /*
                 * The Gerrit Trigger will automatically post the "Verified" results back
index 352737fd1d93c25529dba5f6485cb077462e3560..4934c12141b30080106bd2348f1c635e4cb893bc 100644 (file)
@@ -81,7 +81,7 @@ pipeline {
                                                                                [$class: 'RelativeTargetDirectory', relativeTargetDir: "tests/CI/output/publish-docs"],
                                                                                [$class: 'CloneOption',
                                                                                        noTags: true,
-                                                                                       depth: 10,
+                                                                                       depth: 100,
                                                                                        honorRefspec: true,
                                                                                        shallow: true
                                                                                ],
@@ -129,7 +129,7 @@ pipeline {
                                                                                                [$class: 'RelativeTargetDirectory', relativeTargetDir: groupDir],
                                                                                                [$class: 'CloneOption',
                                                                                                        noTags: true,
-                                                                                                       depth: 10,
+                                                                                                       depth: 100,
                                                                                                        honorRefspec: true,
                                                                                                        shallow: true
                                                                                                ],
@@ -159,7 +159,9 @@ pipeline {
        }
        post {
                cleanup {
-            cleanWs deleteDirs: true, notFailBuild: true
+                       if (env.CLEANUP_WS_DAILIES.toBoolean()) {
+                               cleanWs deleteDirs: true, notFailBuild: false
+                       }
                }
                success {
                        echo "Reporting ${currentBuild.currentResult} Passed"
index a87f7dce64d7ea28b32ec7ba998d8ff0981f5ed3..a2bfdbaeadf438403dd0b9761cce91091f73120a 100644 (file)
@@ -102,7 +102,7 @@ pipeline {
                                                                                                [$class: 'RelativeTargetDirectory', relativeTargetDir: groupDir],
                                                                                                [$class: 'CloneOption',
                                                                                                        noTags: true,
-                                                                                                       depth: 10,
+                                                                                                       depth: 100,
                                                                                                        honorRefspec: true,
                                                                                                        shallow: true
                                                                                                ],
@@ -129,7 +129,9 @@ pipeline {
        }
        post {
                cleanup {
-            cleanWs deleteDirs: true, notFailBuild: true
+                       if (env.CLEANUP_WS_REF_DEBUG.toBoolean()) {
+                               cleanWs deleteDirs: true, notFailBuild: false
+                       }
                }
                success {
                        echo "Reporting ${currentBuild.currentResult} Passed"
index 6f81479c6645eef174f7e9e16f2cf054069653c1..43774fd8fa9b74354351b46e22ce5cdbb1b0b82a 100644 (file)
@@ -115,7 +115,7 @@ pipeline {
                                                                        [$class: 'CloneOption',
                                                                                honorRefspec: true,
                                                                                noTags: true,
-                                                                               depth: 10,
+                                                                               depth: 100,
                                                                                shallow: true
                                                                        ],
                                                                        [$class: 'PruneStaleBranch'],
@@ -183,7 +183,9 @@ pipeline {
        }
        post {
                cleanup {
-            cleanWs deleteDirs: true, notFailBuild: true
+                       if (env.CLEANUP_WS_UNITTESTS.toBoolean()) {
+                               cleanWs deleteDirs: true, notFailBuild: false
+                       }
                }
                /*
                 * The Gerrit Trigger will automatically post the "Verified" results back