[Asterisk-code-review] CI: Increase clone depth and do better cleanup (asterisk[master])

George Joseph asteriskteam at digium.com
Tue Nov 19 11:17:32 CST 2019


George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/13250 )

Change subject: CI: Increase clone depth and do better cleanup
......................................................................

CI: Increase clone depth and do better cleanup

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
---
M tests/CI/gates.jenkinsfile
M tests/CI/periodics-daily.jenkinsfile
M tests/CI/ref_debug.jenkinsfile
M tests/CI/unittests.jenkinsfile
4 files changed, 18 insertions(+), 10 deletions(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit
  Friendly Automation: Verified



diff --git a/tests/CI/gates.jenkinsfile b/tests/CI/gates.jenkinsfile
index 82ef343..284b0fe 100644
--- a/tests/CI/gates.jenkinsfile
+++ b/tests/CI/gates.jenkinsfile
@@ -115,7 +115,7 @@
 									[$class: 'CloneOption',
 										honorRefspec: true,
 										noTags: true,
-										depth: 10,
+										depth: 100,
 										shallow: true
 									],
 									[$class: 'PruneStaleBranch'],
@@ -203,7 +203,7 @@
 												[$class: 'RelativeTargetDirectory', relativeTargetDir: groupDir],
 												[$class: 'CloneOption',
 													noTags: true,
-													depth: 10,
+													depth: 100,
 													honorRefspec: true,
 													shallow: true
 												],
@@ -240,7 +240,9 @@
 	}
 	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
diff --git a/tests/CI/periodics-daily.jenkinsfile b/tests/CI/periodics-daily.jenkinsfile
index 352737f..4934c12 100644
--- a/tests/CI/periodics-daily.jenkinsfile
+++ b/tests/CI/periodics-daily.jenkinsfile
@@ -81,7 +81,7 @@
 										[$class: 'RelativeTargetDirectory', relativeTargetDir: "tests/CI/output/publish-docs"],
 										[$class: 'CloneOption',
 											noTags: true,
-											depth: 10,
+											depth: 100,
 											honorRefspec: true,
 											shallow: true
 										],
@@ -129,7 +129,7 @@
 												[$class: 'RelativeTargetDirectory', relativeTargetDir: groupDir],
 												[$class: 'CloneOption',
 													noTags: true,
-													depth: 10,
+													depth: 100,
 													honorRefspec: true,
 													shallow: true
 												],
@@ -159,7 +159,9 @@
 	}
 	post {
 		cleanup {
-            cleanWs deleteDirs: true, notFailBuild: true
+			if (env.CLEANUP_WS_DAILIES.toBoolean()) {
+				cleanWs deleteDirs: true, notFailBuild: false
+			}
 		}
 		success {
 			echo "Reporting ${currentBuild.currentResult} Passed"
diff --git a/tests/CI/ref_debug.jenkinsfile b/tests/CI/ref_debug.jenkinsfile
index a87f7dc..a2bfdba 100644
--- a/tests/CI/ref_debug.jenkinsfile
+++ b/tests/CI/ref_debug.jenkinsfile
@@ -102,7 +102,7 @@
 												[$class: 'RelativeTargetDirectory', relativeTargetDir: groupDir],
 												[$class: 'CloneOption',
 													noTags: true,
-													depth: 10,
+													depth: 100,
 													honorRefspec: true,
 													shallow: true
 												],
@@ -129,7 +129,9 @@
 	}
 	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"
diff --git a/tests/CI/unittests.jenkinsfile b/tests/CI/unittests.jenkinsfile
index 6f81479..43774fd 100644
--- a/tests/CI/unittests.jenkinsfile
+++ b/tests/CI/unittests.jenkinsfile
@@ -115,7 +115,7 @@
 									[$class: 'CloneOption',
 										honorRefspec: true,
 										noTags: true,
-										depth: 10,
+										depth: 100,
 										shallow: true
 									],
 									[$class: 'PruneStaleBranch'],
@@ -183,7 +183,9 @@
 	}
 	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

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13250
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I0d7366e87cea714e5dbc9488caf718802fce75ca
Gerrit-Change-Number: 13250
Gerrit-PatchSet: 2
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191119/db29366f/attachment-0001.html>


More information about the asterisk-code-review mailing list