Files
PX4-Autopilot/Jenkinsfile
Julian Oes fad4450d7d
Some checks failed
Build all targets / Scan for Board Targets (push) Has been cancelled
Build all targets / Build [${{ matrix.runner }}][${{ matrix.group }}] (push) Has been cancelled
Build all targets / Upload Artifacts (push) Has been cancelled
Checks / build (NO_NINJA_BUILD=1 px4_fmu-v5_default) (push) Has been cancelled
Checks / build (NO_NINJA_BUILD=1 px4_sitl_default) (push) Has been cancelled
Checks / build (check_format) (push) Has been cancelled
Checks / build (check_newlines) (push) Has been cancelled
Checks / build (module_documentation) (push) Has been cancelled
Checks / build (px4_fmu-v2_default stack_check) (push) Has been cancelled
Checks / build (px4_sitl_allyes) (push) Has been cancelled
Checks / build (shellcheck_all) (push) Has been cancelled
Checks / build (tests) (push) Has been cancelled
Checks / build (tests_coverage) (push) Has been cancelled
Checks / build (validate_module_configs) (push) Has been cancelled
Clang Tidy / build (push) Has been cancelled
MacOS build / build (px4_fmu-v5_default) (push) Has been cancelled
MacOS build / build (px4_sitl) (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:22.04) (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:24.04) (push) Has been cancelled
Container build / Set Tags and Variables (push) Has been cancelled
Container build / Build Container (amd64) (push) Has been cancelled
Container build / Build Container (arm64) (push) Has been cancelled
Container build / Deploy To Registry (push) Has been cancelled
EKF Update Change Indicator / unit_tests (push) Has been cancelled
Failsafe Simulator Build / build (failsafe_web) (push) Has been cancelled
FLASH usage analysis / Analyzing px4_fmu-v5x (push) Has been cancelled
FLASH usage analysis / Analyzing px4_fmu-v6x (push) Has been cancelled
FLASH usage analysis / Publish Results (push) Has been cancelled
ITCM check / Checking nxp_mr-tropic (push) Has been cancelled
ITCM check / Checking nxp_tropic-community (push) Has been cancelled
ITCM check / Checking px4_fmu-v5x (push) Has been cancelled
ITCM check / Checking px4_fmu-v6xrt (push) Has been cancelled
MAVROS Mission Tests / build (map[mission:MC_mission_box vehicle:iris]) (push) Has been cancelled
MAVROS Offboard Tests / build (map[test_file:mavros_posix_tests_offboard_posctl.test vehicle:iris]) (push) Has been cancelled
Nuttx Target with extra env config / build (px4_fmu-v5_default) (push) Has been cancelled
Python CI Checks / build (push) Has been cancelled
ROS Integration Tests / build (push) Has been cancelled
ROS Translation Node Tests / Build and test (map[ros_version:humble ubuntu:jammy]) (push) Has been cancelled
ROS Translation Node Tests / Build and test (map[ros_version:jazzy ubuntu:noble]) (push) Has been cancelled
SITL Tests / Testing PX4 tailsitter (push) Has been cancelled
SITL Tests / Testing PX4 iris (push) Has been cancelled
SITL Tests / Testing PX4 standard_vtol (push) Has been cancelled
Handle stale issues and PRs / stale (push) Has been cancelled
Fuzzing / Fuzzing (push) Has been cancelled
Jenkins: pin emscripten version (#26339)
This would match GitHub action and hopefully fix CI.
2026-01-25 12:56:17 -08:00

269 lines
9.0 KiB
Groovy

#!/usr/bin/env groovy
pipeline {
agent none
stages {
stage('Analysis') {
when {
anyOf {
branch 'main'
branch 'master' // should be removed, but in case there is something going on...
branch 'pr-jenkins' // for testing
}
}
parallel {
stage('Airframe') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
steps {
sh 'make distclean; git clean -ff -x -d .'
sh 'git fetch --all --tags'
sh 'make airframe_metadata'
dir('build/px4_sitl_default/docs') {
archiveArtifacts(artifacts: 'airframes.md, airframes.xml')
stash includes: 'airframes.md, airframes.xml', name: 'metadata_airframes'
}
}
post {
always {
sh 'make distclean; git clean -ff -x -d .'
}
}
}
stage('Parameter') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
steps {
sh 'make distclean; git clean -ff -x -d .'
sh 'git fetch --all --tags'
sh 'make parameters_metadata'
dir('build/px4_sitl_default/docs') {
archiveArtifacts(artifacts: 'parameters.md, parameters.xml, parameters.json.xz')
stash includes: 'parameters.md, parameters.xml, parameters.json.xz', name: 'metadata_parameters'
}
}
post {
always {
sh 'make distclean; git clean -ff -x -d .'
}
}
}
stage('Module') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
steps {
sh 'make distclean; git clean -ff -x -d .'
sh 'git fetch --all --tags'
sh 'make module_documentation'
dir('build/px4_sitl_default/docs') {
archiveArtifacts(artifacts: 'modules/*.md')
stash includes: 'modules/*.md', name: 'metadata_module_documentation'
}
}
post {
always {
sh 'make distclean; git clean -ff -x -d .'
}
}
}
stage('msg file docs') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
steps {
sh 'mkdir -p build/msg_docs; ./Tools/msg/generate_msg_docs.py -d build/msg_docs'
dir('build') {
archiveArtifacts(artifacts: 'msg_docs/*.md')
stash includes: 'msg_docs/*.md', name: 'msg_documentation'
}
}
post {
always {
sh 'make distclean; git clean -ff -x -d .'
}
}
}
stage('failsafe docs') {
agent {
docker { image 'px4io/px4-dev-nuttx-focal:2022-08-12' }
}
steps {
sh '''#!/bin/bash -l
echo $0;
git clone https://github.com/emscripten-core/emsdk.git _emscripten_sdk;
cd _emscripten_sdk;
git checkout 4.0.15;
./emsdk install latest;
./emsdk activate latest;
cd ..;
. ./_emscripten_sdk/emsdk_env.sh;
git fetch --all --tags;
make failsafe_web;
cd build/px4_sitl_default_failsafe_web;
mkdir -p failsafe_sim;
cp index.* parameters.json failsafe_sim;
'''
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 .'
}
}
}
stage('uORB graphs') {
agent {
docker {
image 'px4io/px4-dev-nuttx-focal:2022-08-12'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean; git clean -ff -x -d .'
sh 'git fetch --all --tags'
sh 'make uorb_graphs'
dir('Tools/uorb_graph') {
archiveArtifacts(artifacts: 'graph_*.json')
stash includes: 'graph_*.json', name: 'uorb_graph'
}
}
post {
always {
sh 'make distclean; git clean -ff -x -d .'
}
}
}
} // parallel
} // stage: Generate Metadata
stage('Deploy') {
parallel {
stage('Userguide') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
steps {
sh('export')
unstash 'metadata_airframes'
unstash 'metadata_parameters'
unstash 'metadata_module_documentation'
unstash 'msg_documentation'
unstash 'failsafe_sim'
unstash 'uorb_graph'
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-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/public/middleware/') // vitepress
sh('cp -R msg_docs/*.md PX4-user_guide/en/msg_docs/')
sh('cp -R failsafe_sim/* PX4-user_guide/public/config/failsafe') // vitepress
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')
}
}
when {
anyOf {
branch 'main'
branch 'master' // should be removed, but in case there is something going on...
branch 'pr-jenkins' // for testing
}
}
options {
skipDefaultCheckout()
}
}
stage('QGroundControl') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
steps {
sh('export')
unstash 'metadata_airframes'
unstash 'metadata_parameters'
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
sh('git clone https://${GIT_USER}:${GIT_PASS}@github.com/mavlink/qgroundcontrol.git')
sh('cp airframes.xml qgroundcontrol/src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml')
sh('cp parameters.xml qgroundcontrol/src/FirmwarePlugin/PX4/PX4ParameterFactMetaData.xml')
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')
sh('rm -rf qgroundcontrol')
}
}
when {
anyOf {
branch 'main'
branch 'master' // should be removed, but in case there is something going on...
branch 'pr-jenkins' // for testing
}
}
options {
skipDefaultCheckout()
}
}
stage('S3') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
}
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/')
s3Upload(acl: 'PublicRead', bucket: 'px4-travis', file: 'parameters.json.xz', path: 'Firmware/master/')
}
}
when {
anyOf {
branch 'main'
branch 'master' // should be removed, but in case there is something going on...
branch 'pr-jenkins' // for testing
}
}
options {
skipDefaultCheckout()
}
}
} // parallel
} // stage: Generate Metadata
} // stages
environment {
CCACHE_DIR = '/tmp/ccache'
CI = true
GIT_AUTHOR_EMAIL = "bot@px4.io"
GIT_AUTHOR_NAME = "PX4BuildBot"
GIT_COMMITTER_EMAIL = "bot@px4.io"
GIT_COMMITTER_NAME = "PX4BuildBot"
}
options {
buildDiscarder(logRotator(numToKeepStr: '20', artifactDaysToKeepStr: '30'))
timeout(time: 90, unit: 'MINUTES')
}
}