Skip to content

Commit

Permalink
Jenkins: always fully clean git workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Dec 29, 2021
1 parent 6d0339b commit 6706d9b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .ci/Jenkinsfile-compile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 .')
}
}
}
Expand Down
20 changes: 10 additions & 10 deletions .ci/Jenkinsfile-hardware
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
} // stage build
Expand Down Expand Up @@ -99,7 +99,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
} // stage build
Expand Down Expand Up @@ -168,7 +168,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
} // stage build
Expand Down Expand Up @@ -237,7 +237,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
} // stage build
Expand Down Expand Up @@ -305,7 +305,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
} // stage build
Expand Down Expand Up @@ -374,7 +374,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
} // stage build
Expand Down Expand Up @@ -463,7 +463,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
} // stage build
Expand Down Expand Up @@ -544,7 +544,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
} // stage build
Expand Down Expand Up @@ -613,7 +613,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
} // stage build
Expand Down Expand Up @@ -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'
}
Expand Down
24 changes: 12 additions & 12 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -98,7 +98,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
}
Expand All @@ -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') {
Expand All @@ -118,7 +118,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
}
Expand All @@ -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') {
Expand All @@ -138,7 +138,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
}
Expand All @@ -156,7 +156,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
}
Expand All @@ -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') {
Expand All @@ -180,7 +180,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
}
Expand Down Expand Up @@ -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}")
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6706d9b

Please sign in to comment.