[Asterisk-code-review] CI: Update cleanup steps and permissions (asterisk[15])

George Joseph asteriskteam at digium.com
Thu Jul 12 17:00:47 CDT 2018


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/9425 )

Change subject: CI: Update cleanup steps and permissions
......................................................................

CI: Update cleanup steps and permissions

Change-Id: I7ca92935979d94845af8e1caf4468cbd6209b7de
---
M tests/CI/gates.jenkinsfile
M tests/CI/unittests.jenkinsfile
2 files changed, 13 insertions(+), 9 deletions(-)

Approvals:
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/tests/CI/gates.jenkinsfile b/tests/CI/gates.jenkinsfile
index 40c7916..6f489a7 100644
--- a/tests/CI/gates.jenkinsfile
+++ b/tests/CI/gates.jenkinsfile
@@ -60,6 +60,8 @@
 				/* Here's where we switch to scripted pipeline */
 				script {
 					stage ("Checkout") {
+						sh "sudo chown -R jenkins:users ."  
+					
 						/*
 						 * Jenkins has already automatically checked out the base branch
 						 * for this change but we now need to check out the change itself
diff --git a/tests/CI/unittests.jenkinsfile b/tests/CI/unittests.jenkinsfile
index 0925910..7486823 100644
--- a/tests/CI/unittests.jenkinsfile
+++ b/tests/CI/unittests.jenkinsfile
@@ -65,6 +65,7 @@
 			steps {
 				script {
 					stage ("Checkout") {
+						sh "sudo chown -R jenkins:users ."  
 						/*
 						 * Jenkins has already automatically checked out the base branch
 						 * for this change but we now need to check out the change itself
@@ -75,6 +76,7 @@
 						 * The Gerrit Trigger provides all the URLs and refspecs to
 						 * check out the change.
 						 */
+						sh "sudo chown -R jenkins:users ."  
 						checkout scm: [$class: 'GitSCM',
 							branches: [[name: env.GERRIT_BRANCH ]],
 							extensions: [
@@ -134,20 +136,20 @@
 								keepLongStdio: true
 						}
 					}
-
-					stage ('Cleanup') {
-						sh "sudo make distclean || : "
-					}
 				}
 			}
 		}
 	}
-	/*
-	 * The Gerrit Trigger will automatically post the "Verified" results back
-	 * to Gerrit but the verification publisher publishes extra stuff in the
-	 * "Code Review" section of the review.
-	 */
 	post {
+		always {
+			sh "sudo make distclean || : "
+			sh "sudo rm -rf tests/CI/output || : "
+		}
+		/*
+		 * The Gerrit Trigger will automatically post the "Verified" results back
+		 * to Gerrit but the verification publisher publishes extra stuff in the
+		 * "Code Review" section of the review.
+	 	*/
 		success {
 			gerritverificationpublisher verifyStatusValue: 1, verifyStatusCategory: 'Passed',
 				verifyStatusURL: '', verifyStatusComment: '',

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

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I7ca92935979d94845af8e1caf4468cbd6209b7de
Gerrit-Change-Number: 9425
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180712/730de863/attachment-0001.html>


More information about the asterisk-code-review mailing list