Skip to content

Commit c401c6f

Browse files
committed
Add distro ubuntu targets
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
1 parent 0b139f3 commit c401c6f

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

ros_github_scripts/ci_for_pr.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@
3131
CI_SERVER = 'https://ci.ros2.org'
3232
SERVER_RETRIES = 2
3333

34+
ROS_DISTRO_TO_UBUNTU_DISTRO = {
35+
'melodic': 'bionic',
36+
'noetic': 'focal',
37+
'foxy': 'focal',
38+
'galactic': 'focal',
39+
'humble': 'jammy',
40+
'iron': 'jammy',
41+
'rolling': '' # use default
42+
}
43+
3444

3545
def panic(msg: str) -> None:
3646
raise RuntimeError('Panic: ' + msg)
@@ -206,6 +216,9 @@ def run_jenkins_build(
206216
207217
:returns: Text containing markdown of the build status badges for the launched build.
208218
"""
219+
# intentionally raises key_error on unknown distro
220+
ubuntu_distro = ROS_DISTRO_TO_UBUNTU_DISTRO[target_release]
221+
209222
from jenkinsapi.jenkins import Jenkins
210223
logger.info('Connecting to Jenkins server')
211224
jenkins = Jenkins(CI_SERVER, username=github_login, password=github_token, use_crumb=True)
@@ -233,6 +246,8 @@ def run_jenkins_build(
233246
build_params['CI_ROS_DISTRO'] = target_release
234247
build_params['CI_BUILD_ARGS'] += f' {build_args}'
235248
build_params['CI_TEST_ARGS'] += f' {test_args}'
249+
if ubuntu_distro:
250+
build_params['CI_UBUNTU_DISTRO'] = ubuntu_distro
236251

237252
# Start the build and wait until it is completed. ci_launcher exits immediately after
238253
# queuing the child builds, so this should only take a few seconds

0 commit comments

Comments
 (0)