From 948fbf16db1e6aee6f82a9e9285ee427d25c1008 Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Mon, 2 Oct 2023 18:44:30 +0200 Subject: [PATCH 1/2] Support for ROS 2 Iron CI in gzgarden wrappers (#960) Signed-off-by: Jose Luis Rivero --- jenkins-scripts/dsl/ros_gz_bridge.dsl | 33 ++++++++++++++++----------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/jenkins-scripts/dsl/ros_gz_bridge.dsl b/jenkins-scripts/dsl/ros_gz_bridge.dsl index 245c5c671..80492d865 100644 --- a/jenkins-scripts/dsl/ros_gz_bridge.dsl +++ b/jenkins-scripts/dsl/ros_gz_bridge.dsl @@ -10,6 +10,11 @@ def bridge_packages = [ 'ros_gz_sim_demos' ] +def gzgarden_ros_distros_ci = [ + 'humble', + 'iron' +] + // BLOOM PACKAGE BUILDER JOBS bridge_packages.each { pkg -> pkg_dashed = pkg.replaceAll("_", "-") @@ -40,7 +45,7 @@ bridge_packages.each { pkg -> stringParam("LINUX_DISTRO", 'ubuntu', "Linux distribution to build packages for") stringParam("DISTRO", "jammy", "Linux release inside LINUX_DISTRO to build packages for") stringParam("ARCH", "amd64", "Architecture to build packages for") - stringParam('ROS_DISTRO', 'humble','ROS DISTRO to build pakcages for') + stringParam('ROS_DISTRO', null,'ROS DISTRO to build pakcages for') stringParam("UPLOAD_TO_REPO", 'stable', "OSRF repo name to upload the package to") stringParam('UPSTREAM_RELEASE_REPO', 'https://github.com/j-rivero/ros_ign-release', 'Release repository url') } @@ -191,18 +196,20 @@ manual_install_test_job.with } } -def periodic_install_test_job = job("ros_gzgarden_bridge-install-pkg_humble-ci-jammy-amd64") -generate_install_test_job(periodic_install_test_job) -periodic_install_test_job.with -{ - parameters { - stringParam("DISTRO", 'jammy', "Linux release inside LINUX_DISTRO to build packages for") - stringParam("ARCH", 'amd64', "Architecture to build packages for") - stringParam("ROS_DISTRO", 'humble', "ROS distribution") - stringParam("GZ_VERSION", 'garden', "Gazebo version") - } +gzgarden_ros_distros_ci.each { ros_distro -> + def periodic_install_test_job = job("ros_gzgarden_bridge-install-pkg_${ros_distro}-ci-jammy-amd64") + generate_install_test_job(periodic_install_test_job) + periodic_install_test_job.with + { + parameters { + stringParam("DISTRO", 'jammy', "Linux release inside LINUX_DISTRO to build packages for") + stringParam("ARCH", 'amd64', "Architecture to build packages for") + stringParam("ROS_DISTRO", ros_distro, "ROS distribution") + stringParam("GZ_VERSION", 'garden', "Gazebo version") + } - triggers { - scm('@daily') + triggers { + scm('@daily') + } } } From bea701aa436bfb9031da16d2e9280369233c849a Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Mon, 2 Oct 2023 20:19:45 +0200 Subject: [PATCH 2/2] Patches and doc for GzHarmonic ros_gz creation (#1003) * Complete README with custom RELEASE_REPO_URL * Fix problems with renaming different Gazebo distros * Add the list of active releases --------- Signed-off-by: Jose Luis Rivero --- bloom/ros_gz/Dockerfile | 8 ++++---- bloom/ros_gz/README.md | 22 ++++++++++++++++++++++ bloom/ros_gz/rename-ros_gz-pkgs.bash | 4 +++- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/bloom/ros_gz/Dockerfile b/bloom/ros_gz/Dockerfile index 620cd9931..628e39865 100644 --- a/bloom/ros_gz/Dockerfile +++ b/bloom/ros_gz/Dockerfile @@ -17,11 +17,11 @@ RUN apt-get update && apt-get install -y \ wget \ && rm -rf /var/lib/apt/lists/* -# Install osrf-rosdep for Gazebo distributions not in ROS +# Install osrf-rosdep for Gazebo distributions not in ROS. +# Note that 01 is important to give priority to the replace list below RUN sudo bash -c \ - 'wget https://raw.githubusercontent.com/osrf/osrf-rosdep/master/gz/00-gazebo.list -O /etc/ros/rosdep/sources.list.d/00-gazebo.list' -# Replace url -# since it does not support arbitrary environment variables + 'wget https://raw.githubusercontent.com/osrf/osrf-rosdep/master/gz/00-gazebo.list -O /etc/ros/rosdep/sources.list.d/01-gazebo.list' +# Bloom does not support environment vars, use the trick or replacing one rosdep keys by others RUN sudo bash -c \ "wget $URL_OSRF_ROSDEP_REPLACE -O /etc/ros/rosdep/sources.list.d/00-replace-gz.list" diff --git a/bloom/ros_gz/README.md b/bloom/ros_gz/README.md index 466b17005..f0840eee8 100644 --- a/bloom/ros_gz/README.md +++ b/bloom/ros_gz/README.md @@ -27,6 +27,14 @@ Although using the officially supported version is the recommended way specially for non experienced users, some use cases might need to use a newer version of Gazebo than the one selected in REP-2000. +### List of active relases + +| Gazebo Release | ROS / ROS 2 Release | status | ros_gz branch | -release repository | +| ---------------|---------------------|------------|---------------|---------------------| +| Garden | Humble | stable | humble | https://github.com/gazebo-release/ros_ign-release | +| Garden | Iron | prerelease | iron | https://github.com/gazebo-release/ros_ign-release | +| Harmonic | Iron | prerelease | ros2 | https://github.com/j-rivero/ros_ign-gzharmonic-release | + ### Upstream versions released using this tutorial The `gbp -release repository` hosts the latest version released by the @@ -35,6 +43,7 @@ version the version of `ros_gz` released will be the latest one existing in the official `gbp -release repository`. The version would be the same but the release number will start on 1000. + ## 2. Initial setup To release a modified version of `ros_gz` which supports a different major @@ -55,6 +64,19 @@ package name. - Usage: `$ rename-ros_gz-pkgs.bash ` - Example: `$ rename-ros_gz-pkgs.bash garden humble` +The script supports to inject a custom RELEASE_REPO_URL that points to a bloom gbp +repository different than https://github.com/gazebo-release/ros_ign-release. + +``` +i.e use a https://github.com/gazebo-testing/ros_ign-gzharmonic-release as gbp testing repository + +RELEASE_REPO_URL=https://github.com/gazebo-testing/ros_ign-gzharmonic-release \ + ./bloom_from_special_env.bash \ + humble \ + garden \ + https://raw.githubusercontent.com/osrf/osrf-rosdep/master/gz/replace_fortress_with_garden/00-replace-gz-fortress-with-garden.list +``` + ### 2.2 Create a custom track in tracks.yml diff --git a/bloom/ros_gz/rename-ros_gz-pkgs.bash b/bloom/ros_gz/rename-ros_gz-pkgs.bash index 66b3a7953..6f02fe75c 100755 --- a/bloom/ros_gz/rename-ros_gz-pkgs.bash +++ b/bloom/ros_gz/rename-ros_gz-pkgs.bash @@ -47,7 +47,9 @@ for pkg in ${PKGS}; do git commit debian/control.em debian/changelog.em -m "Patch name to release ${GZ_RELEASE} version" # Include conflict with initial package name in ROS sed -i -e '/^Depends/a\Conflicts: \@(Package)' debian/control.em - + if [[ -n ${GZ_RELEASE_TO_CONFLICT} ]]; then + sed -i -e "s/Conflicts: @(Package)/Conflicts: @(Package.replace('-gz','-gz${GZ_RELEASE_TO_CONFLICT}'))/" debian/control.em + fi git commit debian/control.em -m "Set up a conflict with official ROS packages" git push origin "debian/$distro/$pkg" done