[Asterisk-code-review] CI: Update cleanup steps and permissions (asterisk[master])
George Joseph
asteriskteam at digium.com
Wed Jul 11 15:08:32 CDT 2018
George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/9396
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(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/96/9396/1
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/9396
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ca92935979d94845af8e1caf4468cbd6209b7de
Gerrit-Change-Number: 9396
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180711/ea21bb85/attachment.html>
More information about the asterisk-code-review
mailing list