[Asterisk-code-review] CI: Increase clone depth and do better cleanup (testsuite[16])
George Joseph
asteriskteam at digium.com
Tue Nov 19 12:17:37 CST 2019
George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/testsuite/+/13256 )
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: I8e7dc1eab8c132c0315dfecd8395a8ffa2a2e3d2
(cherry picked from commit d4753f771d0440e6be9b1440a563584a7d9d83f2)
---
M CI/gates.jenkinsfile
M CI/unittests.jenkinsfile
2 files changed, 14 insertions(+), 8 deletions(-)
Approvals:
George Joseph: Looks good to me, approved; Approved for Submit
diff --git a/CI/gates.jenkinsfile b/CI/gates.jenkinsfile
index 309bed6..3441c00 100644
--- a/CI/gates.jenkinsfile
+++ b/CI/gates.jenkinsfile
@@ -107,7 +107,7 @@
[$class: 'CloneOption',
honorRefspec: true,
noTags: true,
- depth: 10,
+ depth: 100,
shallow: true
],
[$class: 'PruneStaleBranch'],
@@ -146,7 +146,7 @@
[$class: 'RelativeTargetDirectory', relativeTargetDir: astDir],
[$class: 'CloneOption',
noTags: true,
- depth: 10,
+ depth: 100,
honorRefspec: true,
shallow: true
],
@@ -173,8 +173,11 @@
}
post {
cleanup {
- sh "sudo make distclean 2&>/dev/null || : "
- sh "sudo rm -rf CI/output 2&>/dev/null || : "
+ script {
+ if (env.CLEANUP_WS_GATES.toBoolean()) {
+ cleanWs deleteDirs: true, notFailBuild: false
+ }
+ }
}
/*
* The Gerrit Trigger will automatically post the "Verified" results back
diff --git a/CI/unittests.jenkinsfile b/CI/unittests.jenkinsfile
index 8eb2615..0312c24 100644
--- a/CI/unittests.jenkinsfile
+++ b/CI/unittests.jenkinsfile
@@ -109,7 +109,7 @@
[$class: 'CloneOption',
honorRefspec: true,
noTags: true,
- depth: 10,
+ depth: 100,
shallow: true
],
[$class: 'PruneStaleBranch'],
@@ -148,7 +148,7 @@
[$class: 'RelativeTargetDirectory', relativeTargetDir: astDir],
[$class: 'CloneOption',
noTags: true,
- depth: 10,
+ depth: 100,
honorRefspec: true,
shallow: true
],
@@ -175,8 +175,11 @@
}
post {
cleanup {
- sh "sudo make distclean 2&>/dev/null || : "
- sh "sudo rm -rf CI/output 2&>/dev/null || : "
+ script {
+ 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/testsuite/+/13256
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: 16
Gerrit-Change-Id: I8e7dc1eab8c132c0315dfecd8395a8ffa2a2e3d2
Gerrit-Change-Number: 13256
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/d3eff06a/attachment-0001.html>
More information about the asterisk-code-review
mailing list