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 {
|
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 {
|
2022-10-19 20:36:47 -03:00
|
|
|
sh 'mkdir -p build/msg_docs; ./Tools/msg/generate_msg_docs.py -d build/msg_docs'
|
2021-08-14 16:07:39 -03:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-13 03:51:51 -03:00
|
|
|
stage('failsafe docs') {
|
|
|
|
agent {
|
2023-07-18 14:26:38 -03:00
|
|
|
docker { image 'px4io/px4-dev-nuttx-focal:2022-08-12' }
|
2022-10-13 03:51:51 -03:00
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh '''#!/bin/bash -l
|
2022-10-25 04:48:09 -03:00
|
|
|
echo $0;
|
2022-10-13 03:51:51 -03:00
|
|
|
git clone https://github.com/emscripten-core/emsdk.git _emscripten_sdk;
|
|
|
|
cd _emscripten_sdk;
|
|
|
|
./emsdk install latest;
|
|
|
|
./emsdk activate latest;
|
2022-10-25 04:48:09 -03:00
|
|
|
cd ..;
|
2022-10-13 03:51:51 -03:00
|
|
|
. ./_emscripten_sdk/emsdk_env.sh;
|
2022-10-25 04:48:09 -03:00
|
|
|
make failsafe_web;
|
|
|
|
cd build/px4_sitl_default_failsafe_web;
|
|
|
|
mkdir -p failsafe_sim;
|
|
|
|
cp index.* parameters.json failsafe_sim;
|
|
|
|
'''
|
2022-10-13 03:51:51 -03:00
|
|
|
dir('build/px4_sitl_default_failsafe_web') {
|
|
|
|
archiveArtifacts(artifacts: 'failsafe_sim/*')
|
|
|
|
stash includes: 'failsafe_sim/*', name: 'failsafe_sim'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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 {
|
2023-07-18 14:26:38 -03:00
|
|
|
image 'px4io/px4-dev-nuttx-focal:2022-08-12'
|
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'
|
2022-10-13 03:51:51 -03:00
|
|
|
unstash 'failsafe_sim'
|
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/')
|
2022-10-13 03:51:51 -03:00
|
|
|
sh('cp -R failsafe_sim/* PX4-user_guide/.vuepress/public/en/config/failsafe')
|
2022-07-31 22:39:39 -03:00
|
|
|
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()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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
|
2022-10-19 20:36:47 -03:00
|
|
|
sh('rm -f px4_msgs/msg/*.msg')
|
|
|
|
sh('cp msg/*.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-01-28 11:28:40 -04:00
|
|
|
sh('rm -rf px4_msgs')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
when {
|
|
|
|
anyOf {
|
2022-08-02 20:52:17 -03:00
|
|
|
branch 'main'
|
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
|
|
|
}
|