mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 19:38:22 +00:00
CI: Update cleanup steps and permissions
Change-Id: I7ca92935979d94845af8e1caf4468cbd6209b7de
This commit is contained in:
@@ -60,6 +60,8 @@ pipeline {
|
|||||||
/* Here's where we switch to scripted pipeline */
|
/* Here's where we switch to scripted pipeline */
|
||||||
script {
|
script {
|
||||||
stage ("Checkout") {
|
stage ("Checkout") {
|
||||||
|
sh "sudo chown -R jenkins:users ."
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Jenkins has already automatically checked out the base branch
|
* Jenkins has already automatically checked out the base branch
|
||||||
* for this change but we now need to check out the change itself
|
* for this change but we now need to check out the change itself
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
stage ("Checkout") {
|
stage ("Checkout") {
|
||||||
|
sh "sudo chown -R jenkins:users ."
|
||||||
/*
|
/*
|
||||||
* Jenkins has already automatically checked out the base branch
|
* Jenkins has already automatically checked out the base branch
|
||||||
* for this change but we now need to check out the change itself
|
* for this change but we now need to check out the change itself
|
||||||
@@ -75,6 +76,7 @@ pipeline {
|
|||||||
* The Gerrit Trigger provides all the URLs and refspecs to
|
* The Gerrit Trigger provides all the URLs and refspecs to
|
||||||
* check out the change.
|
* check out the change.
|
||||||
*/
|
*/
|
||||||
|
sh "sudo chown -R jenkins:users ."
|
||||||
checkout scm: [$class: 'GitSCM',
|
checkout scm: [$class: 'GitSCM',
|
||||||
branches: [[name: env.GERRIT_BRANCH ]],
|
branches: [[name: env.GERRIT_BRANCH ]],
|
||||||
extensions: [
|
extensions: [
|
||||||
@@ -134,20 +136,20 @@ pipeline {
|
|||||||
keepLongStdio: true
|
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 {
|
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 {
|
success {
|
||||||
gerritverificationpublisher verifyStatusValue: 1, verifyStatusCategory: 'Passed',
|
gerritverificationpublisher verifyStatusValue: 1, verifyStatusCategory: 'Passed',
|
||||||
verifyStatusURL: '', verifyStatusComment: '',
|
verifyStatusURL: '', verifyStatusComment: '',
|
||||||
|
|||||||
Reference in New Issue
Block a user