From 2b2e6614a5b763097e7925db52979f9608cd4cbc Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Tue, 3 Oct 2023 19:24:11 +0200 Subject: [PATCH] Support ros_gz install testing for Harmonic Signed-off-by: Jose Luis Rivero --- jenkins-scripts/dsl/ros_gz_bridge.dsl | 50 ++++++++++++++++++++------- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/jenkins-scripts/dsl/ros_gz_bridge.dsl b/jenkins-scripts/dsl/ros_gz_bridge.dsl index 80492d865..0d3c470d6 100644 --- a/jenkins-scripts/dsl/ros_gz_bridge.dsl +++ b/jenkins-scripts/dsl/ros_gz_bridge.dsl @@ -1,6 +1,8 @@ import _configs_.* import javaposse.jobdsl.dsl.Job +def WRITE_JOB_LOG = System.getenv('WRITE_JOB_LOG') ?: false + def bridge_packages = [ 'ros_gz', 'ros_gz_bridge', @@ -15,6 +17,14 @@ def gzgarden_ros_distros_ci = [ 'iron' ] +def unofficial_combinations = [ + 'garden' : ['humble', 'iron'], + 'harmonic' : ['iron'] +] + +logging_list = [:] +logging_list['unofficial_wrappers_install_pkg_ci'] = [] + // BLOOM PACKAGE BUILDER JOBS bridge_packages.each { pkg -> pkg_dashed = pkg.replaceAll("_", "-") @@ -196,20 +206,36 @@ manual_install_test_job.with } } -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") +unofficial_combinations.each { gz_release, ros_distros -> + ros_distros.each { ros_distro -> + def periodic_install_test_job = job("ros_gz${gz_release}_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", gz_release, "Gazebo version") + } + + triggers { + scm('@daily') + } } - triggers { - scm('@daily') + logging_list['unofficial_wrappers_install_pkg_ci'].add( + [collection: gz_release, + job_name: periodic_install_test_job.name]) + } +} + + +if (WRITE_JOB_LOG) { + File log_file = new File("jobs.txt") + log_file.withWriter{ file_writer -> + logging_list.each { log_type, items -> + items.each {file_writer.println "${log_type} ${it.collection} ${it.job_name}"} } } }