From 6706d9b434696c23e434c4013128eb9e25076875 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 29 Dec 2021 11:50:07 -0500 Subject: [PATCH] Jenkins: always fully clean git workspace --- .ci/Jenkinsfile-compile | 4 ++-- .ci/Jenkinsfile-hardware | 20 ++++++++++---------- Jenkinsfile | 24 ++++++++++++------------ 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.ci/Jenkinsfile-compile b/.ci/Jenkinsfile-compile index 70086fecf8..abc82a884c 100644 --- a/.ci/Jenkinsfile-compile +++ b/.ci/Jenkinsfile-compile @@ -170,7 +170,7 @@ def createBuildNode(Boolean archive, String docker_image, String target) { try { sh('export') checkout(scm) - sh('make distclean') + sh('make distclean; git clean -ff -x -d .') sh('git fetch --tags') sh('ccache -s') sh('make ' + target) @@ -187,7 +187,7 @@ def createBuildNode(Boolean archive, String docker_image, String target) { throw (exc) } finally { - sh('make distclean') + sh('make distclean; git clean -ff -x -d .') } } } diff --git a/.ci/Jenkinsfile-hardware b/.ci/Jenkinsfile-hardware index 6a173deb24..1033399350 100644 --- a/.ci/Jenkinsfile-hardware +++ b/.ci/Jenkinsfile-hardware @@ -25,7 +25,7 @@ pipeline { } post { always { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' } } } // stage build @@ -99,7 +99,7 @@ pipeline { } post { always { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' } } } // stage build @@ -168,7 +168,7 @@ pipeline { } post { always { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' } } } // stage build @@ -237,7 +237,7 @@ pipeline { } post { always { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' } } } // stage build @@ -305,7 +305,7 @@ pipeline { } post { always { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' } } } // stage build @@ -374,7 +374,7 @@ pipeline { } post { always { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' } } } // stage build @@ -463,7 +463,7 @@ pipeline { } post { always { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' } } } // stage build @@ -544,7 +544,7 @@ pipeline { } post { always { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' } } } // stage build @@ -613,7 +613,7 @@ pipeline { } post { always { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' } } } // stage build @@ -683,7 +683,7 @@ void checkoutSCM() { retry(3) { checkout scm sh 'export' - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' sh 'git fetch --tags' sh 'ccache -z' } diff --git a/Jenkinsfile b/Jenkinsfile index 281397fc39..22d4702879 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -88,7 +88,7 @@ pipeline { docker { image 'px4io/px4-dev-base-focal:2021-08-18' } } steps { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' sh 'git fetch --all --tags' sh 'make airframe_metadata' dir('build/px4_sitl_default/docs') { @@ -98,7 +98,7 @@ pipeline { } post { always { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' } } } @@ -108,7 +108,7 @@ pipeline { docker { image 'px4io/px4-dev-base-focal:2021-08-18' } } steps { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' sh 'git fetch --all --tags' sh 'make parameters_metadata' dir('build/px4_sitl_default/docs') { @@ -118,7 +118,7 @@ pipeline { } post { always { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' } } } @@ -128,7 +128,7 @@ pipeline { docker { image 'px4io/px4-dev-base-focal:2021-08-18' } } steps { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' sh 'git fetch --all --tags' sh 'make module_documentation' dir('build/px4_sitl_default/docs') { @@ -138,7 +138,7 @@ pipeline { } post { always { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' } } } @@ -156,7 +156,7 @@ pipeline { } post { always { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' } } } @@ -170,7 +170,7 @@ pipeline { } steps { sh 'export' - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' sh 'git fetch --all --tags' sh 'make uorb_graphs' dir('Tools/uorb_graph') { @@ -180,7 +180,7 @@ pipeline { } post { always { - sh 'make distclean' + sh 'make distclean; git clean -ff -x -d .' } } } @@ -261,7 +261,7 @@ pipeline { steps { sh('export') sh('git fetch --all --tags') - sh('make distclean') + sh('make distclean; git clean -ff -x -d .') sh('make px4_sitl_rtps') withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) { sh("git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/micrortps_agent.git -b ${BRANCH_NAME}") @@ -290,7 +290,7 @@ pipeline { } steps { sh('export') - sh('make distclean') + sh('make distclean; git clean -ff -x -d .') withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) { sh("git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/px4_msgs.git") // 'master' branch @@ -319,7 +319,7 @@ pipeline { } steps { sh('export') - sh('make distclean') + sh('make distclean; git clean -ff -x -d .') withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) { sh("git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/px4_ros_com.git -b ${BRANCH_NAME}") // deploy uORB RTPS ID map