Jenkins: hardware retry checkout if necessary

This commit is contained in:
Daniel Agar 2021-10-04 11:48:40 -04:00
parent 413e15d083
commit 1325b9c876

View File

@ -17,11 +17,7 @@ pipeline {
}
}
steps {
checkout scm
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
checkoutSCM()
sh 'make cubepilot_cubeorange_test'
sh 'make cubepilot_cubeorange_test bootloader_elf'
sh 'ccache -s'
@ -91,11 +87,7 @@ pipeline {
}
}
steps {
checkout scm
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
checkoutSCM()
sh 'make cuav_x7pro_test'
sh 'make cuav_x7pro_test bootloader_elf'
sh 'ccache -s'
@ -163,11 +155,7 @@ pipeline {
}
}
steps {
checkout scm
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
checkoutSCM()
sh 'make px4_fmu-v3_test'
sh 'make px4_fmu-v3_test bootloader_elf'
sh 'ccache -s'
@ -235,11 +223,7 @@ pipeline {
}
}
steps {
checkout scm
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
checkoutSCM()
sh 'make px4_fmu-v4_test'
sh 'make px4_fmu-v4_test bootloader_elf'
sh 'ccache -s'
@ -306,11 +290,7 @@ pipeline {
}
}
steps {
checkout scm
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
checkoutSCM()
sh 'make px4_fmu-v4pro_test'
sh 'make px4_fmu-v4pro_test bootloader_elf'
sh 'ccache -s'
@ -378,11 +358,7 @@ pipeline {
}
}
steps {
checkout scm
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
checkoutSCM()
sh 'make px4_fmu-v5_debug'
sh 'make px4_fmu-v5_debug bootloader_elf'
sh 'ccache -s'
@ -460,11 +436,7 @@ pipeline {
}
}
steps {
checkout scm
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
checkoutSCM()
sh 'make px4_fmu-v5_optimized'
sh 'make px4_fmu-v5_optimized bootloader_elf'
sh 'ccache -s'
@ -532,11 +504,7 @@ pipeline {
}
}
steps {
checkout scm
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
checkoutSCM()
sh 'make px4_fmu-v5_stackcheck'
sh 'make px4_fmu-v5_stackcheck bootloader_elf'
sh 'ccache -s'
@ -614,11 +582,7 @@ pipeline {
}
}
steps {
checkout scm
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
checkoutSCM()
sh 'make px4_fmu-v5_test'
sh 'make px4_fmu-v5_test bootloader_elf'
sh 'ccache -s'
@ -753,11 +717,7 @@ pipeline {
}
}
steps {
checkout scm
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
checkoutSCM()
sh 'make nxp_fmuk66-v3_test'
//sh 'make nxp_fmuk66-v3_test bootloader_elf'
sh 'ccache -s'
@ -830,6 +790,16 @@ pipeline {
}
}
void checkoutSCM() {
retry(3) {
checkout scm
sh 'export'
sh 'make distclean'
sh 'git fetch --tags'
sh 'ccache -z'
}
}
void quickCalibrate() {
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "commander calibrate accel quick; sleep 1; param show CAL_ACC*"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "commander calibrate gyro; sleep 1; param show CAL_GYRO*"'