]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
CI: Update cleanup steps and permissions
authorGeorge Joseph <gjoseph@digium.com>
Wed, 11 Jul 2018 20:09:19 +0000 (14:09 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Thu, 12 Jul 2018 21:51:27 +0000 (15:51 -0600)
Change-Id: I7ca92935979d94845af8e1caf4468cbd6209b7de

tests/CI/gates.jenkinsfile
tests/CI/unittests.jenkinsfile

index 40c7916b39ab523e8cdb00839d88c5ad00c05800..6f489a789485abc164b2d9cc34e7fda62122b0cc 100644 (file)
@@ -60,6 +60,8 @@ pipeline {
                                /* 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
index 092591036831401151e67b4aeca9ee5496de6758..7486823e70f8702165f76ace76932dee9dc2e910 100644 (file)
@@ -65,6 +65,7 @@ pipeline {
                        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 @@ pipeline {
                                                 * 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 @@ pipeline {
                                                                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: '',