Browse Source

Jenkins: always fully clean git workspace

master
Daniel Agar 3 years ago
parent
commit
6706d9b434
  1. 4
      .ci/Jenkinsfile-compile
  2. 20
      .ci/Jenkinsfile-hardware
  3. 24
      Jenkinsfile

4
.ci/Jenkinsfile-compile

@ -170,7 +170,7 @@ def createBuildNode(Boolean archive, String docker_image, String target) { @@ -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) { @@ -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 .')
}
}
}

20
.ci/Jenkinsfile-hardware

@ -25,7 +25,7 @@ pipeline { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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() { @@ -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'
}

24
Jenkinsfile vendored

@ -88,7 +88,7 @@ pipeline { @@ -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 { @@ -98,7 +98,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
}
@ -108,7 +108,7 @@ pipeline { @@ -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 { @@ -118,7 +118,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
}
@ -128,7 +128,7 @@ pipeline { @@ -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 { @@ -138,7 +138,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
}
@ -156,7 +156,7 @@ pipeline { @@ -156,7 +156,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
}
@ -170,7 +170,7 @@ pipeline { @@ -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 { @@ -180,7 +180,7 @@ pipeline {
}
post {
always {
sh 'make distclean'
sh 'make distclean; git clean -ff -x -d .'
}
}
}
@ -261,7 +261,7 @@ pipeline { @@ -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 { @@ -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 { @@ -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

Loading…
Cancel
Save