2019-03-09 00:17:06 -04:00
|
|
|
#!/usr/bin/env groovy
|
|
|
|
|
2017-10-27 11:47:38 -03:00
|
|
|
pipeline {
|
2017-11-28 13:32:26 -04:00
|
|
|
agent none
|
2017-10-27 11:47:38 -03:00
|
|
|
stages {
|
2017-12-06 20:25:15 -04:00
|
|
|
|
2018-08-04 17:48:47 -03:00
|
|
|
stage('Analysis') {
|
2020-06-30 11:59:55 -03:00
|
|
|
when {
|
|
|
|
anyOf {
|
2022-08-02 20:52:17 -03:00
|
|
|
branch 'main'
|
|
|
|
branch 'master' // should be removed, but in case there is something going on...
|
2020-06-30 11:59:55 -03:00
|
|
|
branch 'pr-jenkins' // for testing
|
|
|
|
}
|
|
|
|
}
|
2017-10-30 11:20:23 -03:00
|
|
|
parallel {
|
2020-09-21 23:23:39 -03:00
|
|
|
// stage('Catkin build on ROS workspace') {
|
|
|
|
// agent {
|
|
|
|
// docker {
|
2021-08-18 11:49:25 -03:00
|
|
|
// image 'px4io/px4-dev-ros-melodic:2021-08-18'
|
2020-09-21 23:23:39 -03:00
|
|
|
// args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// steps {
|
|
|
|
// sh 'ls -l'
|
|
|
|
// sh '''#!/bin/bash -l
|
|
|
|
// echo $0;
|
|
|
|
// mkdir -p catkin_ws/src;
|
|
|
|
// cd catkin_ws;
|
2022-08-22 12:00:03 -03:00
|
|
|
// git -C ${WORKSPACE}/catkin_ws/src/Firmware submodule update --init --recursive --force Tools/simulation/gazebo/sitl_gazebo
|
|
|
|
// git clone --recursive ${WORKSPACE}/catkin_ws/src/Firmware/Tools/simulation/gazebo/sitl_gazebo src/mavlink_sitl_gazebo;
|
2020-09-21 23:23:39 -03:00
|
|
|
// git -C ${WORKSPACE}/catkin_ws/src/Firmware fetch --tags;
|
|
|
|
// source /opt/ros/melodic/setup.bash;
|
|
|
|
// export PYTHONPATH=/opt/ros/$ROS_DISTRO/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages;
|
|
|
|
// catkin init;
|
|
|
|
// catkin build -j$(nproc) -l$(nproc);
|
|
|
|
// '''
|
2022-08-22 12:00:03 -03:00
|
|
|
// // test if the binary was correctly installed and runs using 'mavros_posix_sitl.launch'
|
2020-09-21 23:23:39 -03:00
|
|
|
// sh '''#!/bin/bash -l
|
|
|
|
// echo $0;
|
|
|
|
// source catkin_ws/devel/setup.bash;
|
|
|
|
// rostest px4 pub_test.launch;
|
|
|
|
// '''
|
|
|
|
// }
|
|
|
|
// post {
|
|
|
|
// always {
|
|
|
|
// sh 'rm -rf catkin_ws'
|
|
|
|
// }
|
|
|
|
// failure {
|
|
|
|
// archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.xml, .ros/**/*.log')
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// options {
|
|
|
|
// checkoutToSubdirectory('catkin_ws/src/Firmware')
|
|
|
|
// }
|
|
|
|
// }
|
2018-10-15 17:35:02 -03:00
|
|
|
|
2020-09-02 06:08:03 -03:00
|
|
|
stage('Colcon build on ROS2 workspace') {
|
|
|
|
agent {
|
|
|
|
docker {
|
2021-08-18 11:49:25 -03:00
|
|
|
image 'px4io/px4-dev-ros2-foxy:2021-08-18'
|
2020-09-02 06:08:03 -03:00
|
|
|
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh 'ls -l'
|
|
|
|
sh '''#!/bin/bash -l
|
|
|
|
echo $0;
|
|
|
|
unset ROS_DISTRO;
|
|
|
|
mkdir -p colcon_ws/src;
|
|
|
|
cd colcon_ws;
|
2022-08-22 12:00:03 -03:00
|
|
|
git -C ${WORKSPACE}/colcon_ws/src/Firmware submodule update --init --recursive --force Tools/simulation/gazebo/sitl_gazebo;
|
2020-09-02 06:08:03 -03:00
|
|
|
git -C ${WORKSPACE}/colcon_ws/src/Firmware fetch --tags;
|
2021-02-17 09:16:44 -04:00
|
|
|
source /opt/ros/foxy/setup.sh;
|
2020-09-02 06:08:03 -03:00
|
|
|
colcon build --event-handlers console_direct+ --symlink-install;
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
sh 'rm -rf colcon_ws'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
options {
|
|
|
|
checkoutToSubdirectory('colcon_ws/src/Firmware')
|
|
|
|
}
|
|
|
|
}
|
2018-11-29 09:19:00 -04:00
|
|
|
|
2018-10-15 17:35:02 -03:00
|
|
|
stage('Airframe') {
|
2017-12-10 03:32:21 -04:00
|
|
|
agent {
|
2021-08-18 11:49:25 -03:00
|
|
|
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
2017-12-10 03:32:21 -04:00
|
|
|
}
|
|
|
|
steps {
|
2021-12-29 12:50:07 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2021-04-05 10:51:16 -03:00
|
|
|
sh 'git fetch --all --tags'
|
2017-12-10 03:32:21 -04:00
|
|
|
sh 'make airframe_metadata'
|
2018-11-22 00:27:21 -04:00
|
|
|
dir('build/px4_sitl_default/docs') {
|
2018-08-04 19:22:08 -03:00
|
|
|
archiveArtifacts(artifacts: 'airframes.md, airframes.xml')
|
2018-08-04 20:02:23 -03:00
|
|
|
stash includes: 'airframes.md, airframes.xml', name: 'metadata_airframes'
|
2018-08-04 19:22:08 -03:00
|
|
|
}
|
2018-10-15 17:35:02 -03:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2021-12-29 12:50:07 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2018-10-15 17:35:02 -03:00
|
|
|
}
|
2017-12-10 03:32:21 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-15 17:35:02 -03:00
|
|
|
stage('Parameter') {
|
2017-12-10 03:32:21 -04:00
|
|
|
agent {
|
2021-08-18 11:49:25 -03:00
|
|
|
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
2017-12-10 03:32:21 -04:00
|
|
|
}
|
|
|
|
steps {
|
2021-12-29 12:50:07 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2021-04-05 10:51:16 -03:00
|
|
|
sh 'git fetch --all --tags'
|
2017-12-10 03:32:21 -04:00
|
|
|
sh 'make parameters_metadata'
|
2018-11-22 00:27:21 -04:00
|
|
|
dir('build/px4_sitl_default/docs') {
|
2021-03-17 12:30:21 -03:00
|
|
|
archiveArtifacts(artifacts: 'parameters.md, parameters.xml, parameters.json.xz')
|
|
|
|
stash includes: 'parameters.md, parameters.xml, parameters.json.xz', name: 'metadata_parameters'
|
2018-08-04 19:22:08 -03:00
|
|
|
}
|
2018-10-15 17:35:02 -03:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2021-12-29 12:50:07 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2018-10-15 17:35:02 -03:00
|
|
|
}
|
2017-12-10 03:32:21 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-15 17:35:02 -03:00
|
|
|
stage('Module') {
|
2017-12-10 03:32:21 -04:00
|
|
|
agent {
|
2021-08-18 11:49:25 -03:00
|
|
|
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
2017-12-10 03:32:21 -04:00
|
|
|
}
|
|
|
|
steps {
|
2021-12-29 12:50:07 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2021-04-05 10:24:21 -03:00
|
|
|
sh 'git fetch --all --tags'
|
2017-12-10 03:32:21 -04:00
|
|
|
sh 'make module_documentation'
|
2018-11-22 00:27:21 -04:00
|
|
|
dir('build/px4_sitl_default/docs') {
|
2018-08-04 19:22:08 -03:00
|
|
|
archiveArtifacts(artifacts: 'modules/*.md')
|
2018-08-04 20:02:23 -03:00
|
|
|
stash includes: 'modules/*.md', name: 'metadata_module_documentation'
|
2018-08-04 19:22:08 -03:00
|
|
|
}
|
2018-10-15 17:35:02 -03:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2021-12-29 12:50:07 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2018-10-15 17:35:02 -03:00
|
|
|
}
|
2017-12-10 03:32:21 -04:00
|
|
|
}
|
2017-11-28 13:32:26 -04:00
|
|
|
}
|
2018-01-05 18:20:39 -04:00
|
|
|
|
2021-08-14 16:07:39 -03:00
|
|
|
stage('msg file docs') {
|
2021-07-28 17:05:26 -03:00
|
|
|
agent {
|
2021-08-18 11:49:25 -03:00
|
|
|
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
2021-07-28 17:05:26 -03:00
|
|
|
}
|
|
|
|
steps {
|
2021-08-14 16:07:39 -03:00
|
|
|
sh 'mkdir -p build/msg_docs; ./msg/tools/generate_msg_docs.py -d build/msg_docs'
|
|
|
|
dir('build') {
|
|
|
|
archiveArtifacts(artifacts: 'msg_docs/*.md')
|
|
|
|
stash includes: 'msg_docs/*.md', name: 'msg_documentation'
|
2021-07-28 17:05:26 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2021-12-29 12:50:07 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2021-07-28 17:05:26 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-15 17:35:02 -03:00
|
|
|
stage('uORB graphs') {
|
2018-01-05 18:20:39 -04:00
|
|
|
agent {
|
2018-01-05 23:57:17 -04:00
|
|
|
docker {
|
2021-08-18 11:49:25 -03:00
|
|
|
image 'px4io/px4-dev-nuttx-focal:2021-08-18'
|
2018-02-05 15:08:27 -04:00
|
|
|
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
2018-01-05 23:57:17 -04:00
|
|
|
}
|
2018-01-05 18:20:39 -04:00
|
|
|
}
|
|
|
|
steps {
|
2018-02-05 15:08:27 -04:00
|
|
|
sh 'export'
|
2021-12-29 12:50:07 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2021-04-05 10:24:21 -03:00
|
|
|
sh 'git fetch --all --tags'
|
2018-01-05 18:20:39 -04:00
|
|
|
sh 'make uorb_graphs'
|
2018-08-04 19:22:08 -03:00
|
|
|
dir('Tools/uorb_graph') {
|
2021-07-28 17:07:34 -03:00
|
|
|
archiveArtifacts(artifacts: 'graph_*.json')
|
|
|
|
stash includes: 'graph_*.json', name: 'uorb_graph'
|
2018-08-04 19:22:08 -03:00
|
|
|
}
|
2018-10-15 17:35:02 -03:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2021-12-29 12:50:07 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2018-10-15 17:35:02 -03:00
|
|
|
}
|
2018-01-05 18:20:39 -04:00
|
|
|
}
|
|
|
|
}
|
2018-08-04 13:51:51 -03:00
|
|
|
|
|
|
|
} // parallel
|
|
|
|
} // stage: Generate Metadata
|
2017-12-06 20:25:15 -04:00
|
|
|
|
2018-08-04 20:02:23 -03:00
|
|
|
stage('Deploy') {
|
|
|
|
|
|
|
|
parallel {
|
|
|
|
|
|
|
|
stage('Userguide') {
|
|
|
|
agent {
|
2021-08-18 11:49:25 -03:00
|
|
|
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
2018-08-04 20:02:23 -03:00
|
|
|
}
|
|
|
|
steps {
|
2018-08-12 14:21:00 -03:00
|
|
|
sh('export')
|
2018-08-04 20:02:23 -03:00
|
|
|
unstash 'metadata_airframes'
|
|
|
|
unstash 'metadata_parameters'
|
2020-11-04 05:11:03 -04:00
|
|
|
unstash 'metadata_module_documentation'
|
2021-07-28 17:05:26 -03:00
|
|
|
unstash 'msg_documentation'
|
2021-07-28 17:07:34 -03:00
|
|
|
unstash 'uorb_graph'
|
2018-08-12 14:21:00 -03:00
|
|
|
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
2022-07-31 22:39:39 -03:00
|
|
|
sh('git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/PX4-user_guide.git')
|
|
|
|
sh('cp airframes.md PX4-user_guide/en/airframes/airframe_reference.md')
|
|
|
|
sh('cp parameters.md PX4-user_guide/en/advanced_config/parameter_reference.md')
|
|
|
|
sh('cp -R modules/*.md PX4-user_guide/en/modules/')
|
|
|
|
sh('cp -R graph_*.json PX4-user_guide/.vuepress/public/en/middleware/')
|
|
|
|
sh('cp -R msg_docs/*.md PX4-user_guide/en/msg_docs/')
|
|
|
|
sh('cd PX4-user_guide; git status; git add .; git commit -a -m "Update PX4 Firmware metadata `date`" || true')
|
|
|
|
sh('cd PX4-user_guide; git push origin main || true')
|
|
|
|
sh('rm -rf PX4-user_guide')
|
2018-08-04 20:02:23 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
when {
|
|
|
|
anyOf {
|
2022-08-02 20:52:17 -03:00
|
|
|
branch 'main'
|
|
|
|
branch 'master' // should be removed, but in case there is something going on...
|
2018-08-04 20:02:23 -03:00
|
|
|
branch 'pr-jenkins' // for testing
|
|
|
|
}
|
|
|
|
}
|
|
|
|
options {
|
|
|
|
skipDefaultCheckout()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('QGroundControl') {
|
|
|
|
agent {
|
2021-08-18 11:49:25 -03:00
|
|
|
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
2018-08-04 20:02:23 -03:00
|
|
|
}
|
|
|
|
steps {
|
2018-08-12 14:21:00 -03:00
|
|
|
sh('export')
|
2018-08-04 20:02:23 -03:00
|
|
|
unstash 'metadata_airframes'
|
|
|
|
unstash 'metadata_parameters'
|
2018-08-12 14:21:00 -03:00
|
|
|
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
2018-08-04 20:02:23 -03:00
|
|
|
sh('git clone https://${GIT_USER}:${GIT_PASS}@github.com/mavlink/qgroundcontrol.git')
|
2018-08-12 14:21:00 -03:00
|
|
|
sh('cp airframes.xml qgroundcontrol/src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml')
|
|
|
|
sh('cp parameters.xml qgroundcontrol/src/FirmwarePlugin/PX4/PX4ParameterFactMetaData.xml')
|
2018-10-17 11:53:38 -03:00
|
|
|
sh('cd qgroundcontrol; git status; git add .; git commit -a -m "Update PX4 Firmware metadata `date`" || true')
|
|
|
|
sh('cd qgroundcontrol; git push origin master || true')
|
2018-12-02 12:11:00 -04:00
|
|
|
sh('rm -rf qgroundcontrol')
|
2018-08-04 20:02:23 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
when {
|
|
|
|
anyOf {
|
2022-08-02 20:52:17 -03:00
|
|
|
branch 'main'
|
|
|
|
branch 'master' // should be removed, but in case there is something going on...
|
2018-08-04 20:02:23 -03:00
|
|
|
branch 'pr-jenkins' // for testing
|
|
|
|
}
|
|
|
|
}
|
|
|
|
options {
|
|
|
|
skipDefaultCheckout()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-18 11:39:27 -03:00
|
|
|
stage('microRTPS agent') {
|
|
|
|
agent {
|
2021-08-18 11:49:25 -03:00
|
|
|
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
2020-08-18 11:39:27 -03:00
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh('export')
|
2020-08-25 10:45:50 -03:00
|
|
|
sh('git fetch --all --tags')
|
2021-12-29 12:50:07 -04:00
|
|
|
sh('make distclean; git clean -ff -x -d .')
|
2020-08-18 19:22:23 -03:00
|
|
|
sh('make px4_sitl_rtps')
|
2020-08-18 11:39:27 -03:00
|
|
|
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
2020-09-02 10:11:25 -03:00
|
|
|
sh("git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/micrortps_agent.git -b ${BRANCH_NAME}")
|
|
|
|
sh("rm -rf micrortps_agent/src micrortps_agent/idl")
|
2020-08-18 11:39:27 -03:00
|
|
|
sh('cp -R build/px4_sitl_rtps/src/modules/micrortps_bridge/micrortps_agent/* micrortps_agent')
|
2020-09-02 10:11:25 -03:00
|
|
|
sh('cd micrortps_agent; git status; git add src; git commit -a -m "Update microRTPS agent source code `date`" || true')
|
|
|
|
sh('cd micrortps_agent; git push origin ${BRANCH_NAME} || true')
|
|
|
|
sh('cd micrortps_agent; git status; git add idl; git commit -a -m "Update IDL definitions `date`" || true')
|
|
|
|
sh('cd micrortps_agent; git push origin ${BRANCH_NAME} || true')
|
|
|
|
sh('cd micrortps_agent; git status; git add CMakeLists.txt; git commit -a -m "Update CMakeLists.txt `date`" || true')
|
|
|
|
sh('cd micrortps_agent; git push origin ${BRANCH_NAME} || true')
|
|
|
|
sh('rm -rf micrortps_agent')
|
2020-08-18 11:39:27 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
when {
|
|
|
|
anyOf {
|
2022-08-02 20:52:17 -03:00
|
|
|
branch 'main'
|
|
|
|
branch 'master' // should be removed, but in case there is something going on...
|
2020-08-18 11:39:27 -03:00
|
|
|
branch 'pr-jenkins' // for testing
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-27 13:47:11 -04:00
|
|
|
stage('PX4 ROS msgs') {
|
2019-01-27 13:02:33 -04:00
|
|
|
agent {
|
2021-08-18 11:49:25 -03:00
|
|
|
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
2019-01-27 13:02:33 -04:00
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh('export')
|
2021-12-29 12:50:07 -04:00
|
|
|
sh('make distclean; git clean -ff -x -d .')
|
2019-01-27 13:02:33 -04:00
|
|
|
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
2019-02-14 11:41:40 -04:00
|
|
|
sh("git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/px4_msgs.git")
|
2022-09-07 01:09:44 -03:00
|
|
|
// 'main' branch
|
2020-09-02 08:21:56 -03:00
|
|
|
sh('./msg/tools/uorb_to_ros_msgs.py msg/ px4_msgs/msg/')
|
2019-01-27 13:02:33 -04:00
|
|
|
sh('cd px4_msgs; git status; git add .; git commit -a -m "Update message definitions `date`" || true')
|
2022-09-07 01:09:44 -03:00
|
|
|
sh('cd px4_msgs; git push origin main || true')
|
2019-02-14 11:41:40 -04:00
|
|
|
// 'ros1' branch
|
2019-02-14 12:23:01 -04:00
|
|
|
sh('cd px4_msgs; git checkout ros1')
|
2020-09-02 08:21:56 -03:00
|
|
|
sh('./msg/tools/uorb_to_ros_msgs.py msg/ px4_msgs/msg/')
|
2019-02-14 11:41:40 -04:00
|
|
|
sh('cd px4_msgs; git status; git add .; git commit -a -m "Update message definitions `date`" || true')
|
2019-02-14 12:23:01 -04:00
|
|
|
sh('cd px4_msgs; git push origin ros1 || true')
|
2019-01-28 11:28:40 -04:00
|
|
|
sh('rm -rf px4_msgs')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
when {
|
|
|
|
anyOf {
|
2022-08-02 20:52:17 -03:00
|
|
|
branch 'main'
|
|
|
|
branch 'master' // should be removed, but in case there is something going on...
|
2019-02-14 12:23:01 -04:00
|
|
|
branch 'pr-jenkins' // for testing
|
2019-01-28 11:28:40 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('PX4 ROS2 bridge') {
|
|
|
|
agent {
|
2021-08-18 11:49:25 -03:00
|
|
|
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
2019-01-28 11:28:40 -04:00
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh('export')
|
2021-12-29 12:50:07 -04:00
|
|
|
sh('make distclean; git clean -ff -x -d .')
|
2019-01-28 11:28:40 -04:00
|
|
|
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
|
2021-08-14 16:41:09 -03:00
|
|
|
sh('./msg/tools/uorb_to_ros_urtps_topics.py -i msg/tools/urtps_bridge_topics.yaml -o px4_ros_com/templates/urtps_bridge_topics.yaml')
|
2019-01-28 11:28:40 -04:00
|
|
|
sh('cd px4_ros_com; git status; git add .; git commit -a -m "Update uORB RTPS ID map `date`" || true')
|
2019-02-04 05:08:57 -04:00
|
|
|
sh('cd px4_ros_com; git push origin ${BRANCH_NAME} || true')
|
2019-01-28 11:28:40 -04:00
|
|
|
// deploy uORB RTPS required tools
|
|
|
|
sh('cp msg/tools/uorb_rtps_classifier.py px4_ros_com/scripts/uorb_rtps_classifier.py')
|
|
|
|
sh('cp msg/tools/generate_microRTPS_bridge.py px4_ros_com/scripts/generate_microRTPS_bridge.py')
|
|
|
|
sh('cp msg/tools/px_generate_uorb_topic_files.py px4_ros_com/scripts/px_generate_uorb_topic_files.py')
|
|
|
|
sh('cp msg/tools/px_generate_uorb_topic_helper.py px4_ros_com/scripts/px_generate_uorb_topic_helper.py')
|
2019-10-04 12:42:26 -03:00
|
|
|
// deploy templates
|
|
|
|
sh('cp msg/templates/urtps/microRTPS_agent.cpp.em px4_ros_com/templates/microRTPS_agent.cpp.em')
|
2020-03-10 11:21:03 -03:00
|
|
|
sh('cp msg/templates/urtps/microRTPS_timesync.cpp.em px4_ros_com/templates/microRTPS_timesync.cpp.em')
|
|
|
|
sh('cp msg/templates/urtps/microRTPS_timesync.h.em px4_ros_com/templates/microRTPS_timesync.h.em')
|
2019-10-04 12:42:26 -03:00
|
|
|
sh('cp msg/templates/urtps/microRTPS_transport.cpp px4_ros_com/templates/microRTPS_transport.cpp')
|
|
|
|
sh('cp msg/templates/urtps/microRTPS_transport.h px4_ros_com/templates/microRTPS_transport.h')
|
|
|
|
sh('cp msg/templates/urtps/Publisher.cpp.em px4_ros_com/templates/Publisher.cpp.em')
|
|
|
|
sh('cp msg/templates/urtps/Publisher.h.em px4_ros_com/templates/Publisher.h.em')
|
|
|
|
sh('cp msg/templates/urtps/Subscriber.cpp.em px4_ros_com/templates/Subscriber.cpp.em')
|
|
|
|
sh('cp msg/templates/urtps/Subscriber.h.em px4_ros_com/templates/Subscriber.h.em')
|
|
|
|
sh('cp msg/templates/urtps/RtpsTopics.cpp.em px4_ros_com/templates/RtpsTopics.cpp.em')
|
|
|
|
sh('cp msg/templates/urtps/RtpsTopics.h.em px4_ros_com/templates/RtpsTopics.h.em')
|
2019-01-28 11:28:40 -04:00
|
|
|
sh('cd px4_ros_com; git status; git add .; git commit -a -m "Update uORB RTPS script tools `date`" || true')
|
|
|
|
sh('cd px4_ros_com; git push origin ${BRANCH_NAME} || true')
|
2019-01-27 13:02:33 -04:00
|
|
|
sh('rm -rf px4_msgs')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
when {
|
|
|
|
anyOf {
|
2022-08-02 20:52:17 -03:00
|
|
|
branch 'main'
|
|
|
|
branch 'master' // should be removed, but in case there is something going on...
|
2019-02-04 05:56:21 -04:00
|
|
|
branch 'pr-jenkins' // for testing
|
2019-01-27 13:02:33 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-17 23:00:01 -03:00
|
|
|
stage('S3') {
|
|
|
|
agent {
|
2021-08-18 11:49:25 -03:00
|
|
|
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
2018-08-17 23:00:01 -03:00
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh('export')
|
|
|
|
unstash 'metadata_airframes'
|
|
|
|
unstash 'metadata_parameters'
|
|
|
|
sh('ls')
|
|
|
|
withAWS(credentials: 'px4_aws_s3_key', region: 'us-east-1') {
|
|
|
|
s3Upload(acl: 'PublicRead', bucket: 'px4-travis', file: 'airframes.xml', path: 'Firmware/master/')
|
|
|
|
s3Upload(acl: 'PublicRead', bucket: 'px4-travis', file: 'parameters.xml', path: 'Firmware/master/')
|
2021-03-17 12:30:21 -03:00
|
|
|
s3Upload(acl: 'PublicRead', bucket: 'px4-travis', file: 'parameters.json.xz', path: 'Firmware/master/')
|
2018-08-17 23:00:01 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
when {
|
|
|
|
anyOf {
|
2022-08-02 20:52:17 -03:00
|
|
|
branch 'main'
|
|
|
|
branch 'master' // should be removed, but in case there is something going on...
|
2018-08-17 23:00:01 -03:00
|
|
|
branch 'pr-jenkins' // for testing
|
|
|
|
}
|
|
|
|
}
|
|
|
|
options {
|
|
|
|
skipDefaultCheckout()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-04 20:02:23 -03:00
|
|
|
} // parallel
|
|
|
|
} // stage: Generate Metadata
|
|
|
|
|
2018-03-23 02:09:33 -03:00
|
|
|
} // stages
|
|
|
|
|
2018-02-05 15:08:27 -04:00
|
|
|
environment {
|
|
|
|
CCACHE_DIR = '/tmp/ccache'
|
|
|
|
CI = true
|
2018-08-12 14:21:00 -03:00
|
|
|
GIT_AUTHOR_EMAIL = "bot@px4.io"
|
2018-08-04 20:02:23 -03:00
|
|
|
GIT_AUTHOR_NAME = "PX4BuildBot"
|
2018-08-12 14:21:00 -03:00
|
|
|
GIT_COMMITTER_EMAIL = "bot@px4.io"
|
2018-08-04 20:02:23 -03:00
|
|
|
GIT_COMMITTER_NAME = "PX4BuildBot"
|
2018-02-05 15:08:27 -04:00
|
|
|
}
|
2017-12-10 03:32:21 -04:00
|
|
|
options {
|
2021-05-16 16:33:35 -03:00
|
|
|
buildDiscarder(logRotator(numToKeepStr: '20', artifactDaysToKeepStr: '30'))
|
|
|
|
timeout(time: 90, unit: 'MINUTES')
|
2017-10-27 11:47:38 -03:00
|
|
|
}
|
2017-11-05 16:04:14 -04:00
|
|
|
}
|