Jenkins CI: PX4 ROS msgs stage: deploy message definitions to the 'ros1' branch of 'px4_msgs'

This commit is contained in:
TSC21 2019-02-14 15:41:40 +00:00 committed by Nuno Marques
parent 197ddd3e46
commit d1182f18ed
1 changed files with 9 additions and 3 deletions

12
Jenkinsfile vendored
View File

@ -505,17 +505,23 @@ pipeline {
sh('export')
sh('make distclean')
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_msgs.git -b ${BRANCH_NAME}")
sh("git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/px4_msgs.git")
// 'master' branch
sh('python msg/tools/uorb_to_ros_msgs.py msg/ px4_msgs/msg/')
sh('cd px4_msgs; git status; git add .; git commit -a -m "Update message definitions `date`" || true')
sh('cd px4_msgs; git push origin ${BRANCH_NAME} || true')
sh('cd px4_msgs; git push origin master || true')
// 'ros1' branch
sh('cd px4_msgs; git checkout feature/deploy_ros1_msgs')
sh('python msg/tools/uorb_to_ros_msgs.py msg/ px4_msgs/msg/')
sh('cd px4_msgs; git status; git add .; git commit -a -m "Update message definitions `date`" || true')
sh('cd px4_msgs; git push origin feature/deploy_ros1_msgs || true')
sh('rm -rf px4_msgs')
}
}
when {
anyOf {
branch 'master'
branch 'pr-jenkins' // for testing
branch 'feature/deploy_ros1_msgs' // for testing
}
}
}