Browse Source

jenkins: cleanup post stage steps

sbg
Anthony Lamping 6 years ago committed by Daniel Agar
parent
commit
27b2dad1fb
  1. 112
      Jenkinsfile

112
Jenkinsfile vendored

@ -5,14 +5,14 @@ pipeline { @@ -5,14 +5,14 @@ pipeline {
stage('Analysis') {
parallel {
stage('catkin') {
stage('Catkin') {
agent {
docker {
image 'px4io/px4-dev-ros:2018-09-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'ls -l'
sh '''#!/bin/bash -l
@ -25,24 +25,32 @@ pipeline { @@ -25,24 +25,32 @@ pipeline {
source devel/setup.bash;
catkin build -j$(nproc) -l$(nproc);
'''
sh 'rm -rf catkin_ws'
}
post {
always {
sh 'rm -rf catkin_ws'
}
}
options {
checkoutToSubdirectory('catkin_ws/src/Firmware')
}
}
stage('Style Check') {
stage('Style check') {
agent {
docker { image 'px4io/px4-dev-base:2018-09-11' }
}
steps {
sh 'make check_format'
}
post {
always {
sh 'rm -rf catkin_ws'
}
}
}
stage('bloaty px4fmu-v2') {
stage('Bloaty px4fmu-v2') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2018-09-11'
@ -62,11 +70,15 @@ pipeline { @@ -62,11 +70,15 @@ pipeline {
sh 'make nuttx_px4fmu-v2_default bloaty_compare_master'
sh 'make sizes'
sh 'ccache -s'
sh 'make distclean'
}
post {
always {
sh 'make distclean'
}
}
}
stage('bloaty px4fmu-v5') {
stage('Bloaty px4fmu-v5') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2018-09-11'
@ -86,11 +98,15 @@ pipeline { @@ -86,11 +98,15 @@ pipeline {
sh 'make nuttx_px4fmu-v5_default bloaty_compare_master'
sh 'make sizes'
sh 'ccache -s'
sh 'make distclean'
}
post {
always {
sh 'make distclean'
}
}
}
stage('clang analyzer') {
stage('Clang analyzer') {
agent {
docker {
image 'px4io/px4-dev-clang:2018-09-11'
@ -111,7 +127,11 @@ pipeline { @@ -111,7 +127,11 @@ pipeline {
reportFiles: '*',
reportName: 'Clang Static Analyzer'
]
sh 'make distclean'
}
post {
always {
sh 'make distclean'
}
}
when {
anyOf {
@ -123,7 +143,7 @@ pipeline { @@ -123,7 +143,7 @@ pipeline {
}
}
stage('clang tidy') {
stage('Clang tidy') {
agent {
docker {
image 'px4io/px4-dev-clang:2018-03-30'
@ -136,11 +156,15 @@ pipeline { @@ -136,11 +156,15 @@ pipeline {
sh 'make distclean'
sh 'make clang-tidy-quiet'
}
sh 'make distclean'
}
post {
always {
sh 'make distclean'
}
}
}
stage('cppcheck') {
stage('Cppcheck') {
agent {
docker {
image 'px4io/px4-dev-base:2018-09-11'
@ -161,7 +185,11 @@ pipeline { @@ -161,7 +185,11 @@ pipeline {
reportFiles: '*',
reportName: 'Cppcheck'
]
sh 'make distclean'
}
post {
always {
sh 'make distclean'
}
}
when {
anyOf {
@ -173,7 +201,7 @@ pipeline { @@ -173,7 +201,7 @@ pipeline {
}
}
stage('check stack') {
stage('Check stack') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2018-09-11'
@ -184,7 +212,11 @@ pipeline { @@ -184,7 +212,11 @@ pipeline {
sh 'export'
sh 'make distclean'
sh 'make px4fmu-v2_default stack_check'
sh 'make distclean'
}
post {
always {
sh 'make distclean'
}
}
}
@ -199,11 +231,15 @@ pipeline { @@ -199,11 +231,15 @@ pipeline {
sh 'export'
sh 'make distclean'
sh 'make shellcheck_all'
sh 'make distclean'
}
post {
always {
sh 'make distclean'
}
}
}
stage('Module Config Validation') {
stage('Module config validation') {
agent {
docker {
image 'px4io/px4-dev-base:2018-09-11'
@ -212,8 +248,14 @@ pipeline { @@ -212,8 +248,14 @@ pipeline {
}
steps {
sh 'export'
sh 'make distclean'
sh 'make validate_module_configs'
}
post {
always {
sh 'make distclean'
}
}
}
} // parallel
@ -223,7 +265,7 @@ pipeline { @@ -223,7 +265,7 @@ pipeline {
parallel {
stage('airframe') {
stage('Airframe') {
agent {
docker { image 'px4io/px4-dev-base:2018-09-11' }
}
@ -234,11 +276,15 @@ pipeline { @@ -234,11 +276,15 @@ pipeline {
archiveArtifacts(artifacts: 'airframes.md, airframes.xml')
stash includes: 'airframes.md, airframes.xml', name: 'metadata_airframes'
}
sh 'make distclean'
}
post {
always {
sh 'make distclean'
}
}
}
stage('parameter') {
stage('Parameter') {
agent {
docker { image 'px4io/px4-dev-base:2018-09-11' }
}
@ -249,11 +295,15 @@ pipeline { @@ -249,11 +295,15 @@ pipeline {
archiveArtifacts(artifacts: 'parameters.md, parameters.xml')
stash includes: 'parameters.md, parameters.xml', name: 'metadata_parameters'
}
sh 'make distclean'
}
post {
always {
sh 'make distclean'
}
}
}
stage('module') {
stage('Module') {
agent {
docker { image 'px4io/px4-dev-base:2018-09-11' }
}
@ -264,11 +314,15 @@ pipeline { @@ -264,11 +314,15 @@ pipeline {
archiveArtifacts(artifacts: 'modules/*.md')
stash includes: 'modules/*.md', name: 'metadata_module_documentation'
}
sh 'make distclean'
}
post {
always {
sh 'make distclean'
}
}
}
stage('uorb graphs') {
stage('uORB graphs') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2018-09-11'
@ -283,7 +337,11 @@ pipeline { @@ -283,7 +337,11 @@ pipeline {
archiveArtifacts(artifacts: 'graph_sitl.json')
stash includes: 'graph_sitl.json', name: 'uorb_graph'
}
sh 'make distclean'
}
post {
always {
sh 'make distclean'
}
}
}

Loading…
Cancel
Save