diff --git a/jenkins-scripts/docker/debian-ratt-builder.bash b/jenkins-scripts/docker/debian-ratt-builder.bash index 2b643b126..8019ac6bc 100644 --- a/jenkins-scripts/docker/debian-ratt-builder.bash +++ b/jenkins-scripts/docker/debian-ratt-builder.bash @@ -8,13 +8,11 @@ echo '# BEGIN SECTION: setup the testing enviroment' # Define the name to be used in docker export DOCKER_JOB_NAME="debian_ratt_builder" . "${SCRIPT_DIR}/lib/boilerplate_prepare.sh" +. "${SCRIPT_DIR}/lib/_common_scripts.bash" echo '# END SECTION' cat > build.sh << DELIM -################################################### -# Make project-specific changes here -# -set -ex +$(generate_buildsh_header) if ${USE_UNSTABLE}; then TARGET_DISTRO='unstable' diff --git a/jenkins-scripts/docker/gz-source-generation.bash b/jenkins-scripts/docker/gz-source-generation.bash index 85f7600b6..b7401268f 100644 --- a/jenkins-scripts/docker/gz-source-generation.bash +++ b/jenkins-scripts/docker/gz-source-generation.bash @@ -6,11 +6,11 @@ echo '# BEGIN SECTION: setup the testing enviroment' # Define the name to be used in docker export DOCKER_JOB_NAME="source_generation_job" . ${SCRIPT_DIR}/lib/boilerplate_prepare.sh +. ${SCRIPT_DIR}/lib/_common_scripts.bash echo '# END SECTION' cat > build.sh << DELIM -#!/bin/bash -set -ex +$(generate_buildsh_header) PKG_DIR=\$WORKSPACE/pkgs SOURCES_DIR=\$WORKSPACE/sources diff --git a/jenkins-scripts/docker/lib/_common_scripts.bash b/jenkins-scripts/docker/lib/_common_scripts.bash index 30e006bc4..e2fd99823 100644 --- a/jenkins-scripts/docker/lib/_common_scripts.bash +++ b/jenkins-scripts/docker/lib/_common_scripts.bash @@ -1 +1,14 @@ export APT_INSTALL="sudo DEBIAN_FRONTEND=noninteractive apt-get install -y" + +generate_buildsh_header() +{ + SHELL_ON_ERRORS=${SHELL_ON_ERRORS:-false} + echo "#!/bin/bash" + echo "set -ex" + if ${SHELL_ON_ERRORS}; then + echo 'trap "/bin/bash" 0 INT QUIT ABRT PIPE TERM' + fi + if $GENERIC_ENABLE_TIMING; then + echo "source ${TIMING_DIR}/_time_lib.sh ${WORKSPACE}" + fi +} diff --git a/jenkins-scripts/docker/lib/_generic_linux_compilation_build.sh.bash b/jenkins-scripts/docker/lib/_generic_linux_compilation_build.sh.bash index 344431001..ee737e521 100644 --- a/jenkins-scripts/docker/lib/_generic_linux_compilation_build.sh.bash +++ b/jenkins-scripts/docker/lib/_generic_linux_compilation_build.sh.bash @@ -19,13 +19,10 @@ fi [[ -z $GENERIC_ENABLE_CPPCHECK ]] && GENERIC_ENABLE_CPPCHECK=true [[ -z $GENERIC_ENABLE_TESTS ]] && GENERIC_ENABLE_TESTS=true -cat > build.sh << DELIM_HEADER -#!/bin/bash -set -ex +. ${SCRIPT_DIR}/lib/_common_scripts.bash -if $GENERIC_ENABLE_TIMING; then - source ${TIMING_DIR}/_time_lib.sh ${WORKSPACE} -fi +cat > build.sh << DELIM_HEADER +$(generate_buildsh_header) DELIM_HEADER # Process the source build of dependencies if needed diff --git a/jenkins-scripts/docker/lib/boilerplate_prepare.sh b/jenkins-scripts/docker/lib/boilerplate_prepare.sh index 4566d5366..d3ecea0b3 100755 --- a/jenkins-scripts/docker/lib/boilerplate_prepare.sh +++ b/jenkins-scripts/docker/lib/boilerplate_prepare.sh @@ -49,6 +49,10 @@ source ${SCRIPT_DIR}/../lib/boilerplate_timing_prepare.sh init_stopwatch TOTAL_TIME init_stopwatch CREATE_TESTING_ENVIROMENT +# Enable shell on errors is designed to help debuging but never +# to be run on Jenkins. +SHELL_ON_ERRORS=${SHELL_ON_ERRORS:-false} + # Default values - Provide them is prefered if [ -z ${DISTRO} ]; then DISTRO=bionic diff --git a/jenkins-scripts/docker/lib/debbuild-backport.bash b/jenkins-scripts/docker/lib/debbuild-backport.bash index 2c794ed33..65cac6382 100644 --- a/jenkins-scripts/docker/lib/debbuild-backport.bash +++ b/jenkins-scripts/docker/lib/debbuild-backport.bash @@ -12,13 +12,10 @@ fi export ENABLE_REAPER=false . ${SCRIPT_DIR}/lib/boilerplate_prepare.sh +. ${SCRIPT_DIR}/lib/_common_scripts.bash cat > build.sh << DELIM -################################################### -# Make project-specific changes here -# -#!/usr/bin/env bash -set -ex +$(generate_buildsh_header) cd $WORKSPACE/build diff --git a/jenkins-scripts/docker/lib/debbuild-base.bash b/jenkins-scripts/docker/lib/debbuild-base.bash index 70b3e4591..03a77e0c8 100644 --- a/jenkins-scripts/docker/lib/debbuild-base.bash +++ b/jenkins-scripts/docker/lib/debbuild-base.bash @@ -20,14 +20,11 @@ fi export ENABLE_REAPER=false . ${SCRIPT_DIR}/lib/boilerplate_prepare.sh +. ${SCRIPT_DIR}/lib/_common_scripts.bash . ${SCRIPT_DIR}/lib/_gazebo_utils.sh cat > build.sh << DELIM -################################################### -# Make project-specific changes here -# -#!/usr/bin/env bash -set -ex +$(generate_buildsh_header) cd $WORKSPACE/build diff --git a/jenkins-scripts/docker/lib/debbuild-bloom-base.bash b/jenkins-scripts/docker/lib/debbuild-bloom-base.bash index dee903dd0..3bd74ca0c 100644 --- a/jenkins-scripts/docker/lib/debbuild-bloom-base.bash +++ b/jenkins-scripts/docker/lib/debbuild-bloom-base.bash @@ -23,14 +23,11 @@ export ENABLE_REAPER=false PACKAGE_UNDERSCORE_NAME=${PACKAGE//-/_} . ${SCRIPT_DIR}/lib/boilerplate_prepare.sh +. ${SCRIPT_DIR}/lib/_common_scripts.bash . ${SCRIPT_DIR}/lib/_gazebo_utils.sh cat > build.sh << DELIM -################################################### -# Make project-specific changes here -# -#!/usr/bin/env bash -set -ex +$(generate_buildsh_header) cd $WORKSPACE/build diff --git a/jenkins-scripts/docker/lib/debian-git-repo-base.bash b/jenkins-scripts/docker/lib/debian-git-repo-base.bash index ebede7a4a..4298af32e 100644 --- a/jenkins-scripts/docker/lib/debian-git-repo-base.bash +++ b/jenkins-scripts/docker/lib/debian-git-repo-base.bash @@ -5,6 +5,7 @@ export ENABLE_REAPER=false . ${SCRIPT_DIR}/lib/boilerplate_prepare.sh +. ${SCRIPT_DIR}/lib/_common_scripts.bash . ${SCRIPT_DIR}/lib/_gazebo_utils.sh # The git plugin leaves a repository copy with a detached HEAD @@ -26,11 +27,7 @@ if [[ -z ${BRANCH} ]]; then fi cat > build.sh << DELIM -################################################### -# Make project-specific changes here -# -#!/usr/bin/env bash -set -ex +$(generate_buildsh_header) if ${CLONE_NEEDED}; then echo '# BEGIN SECTION: clone the git repo' diff --git a/jenkins-scripts/docker/lib/docker_generate_dockerfile.bash b/jenkins-scripts/docker/lib/docker_generate_dockerfile.bash index 873f15369..2dba8ef21 100644 --- a/jenkins-scripts/docker/lib/docker_generate_dockerfile.bash +++ b/jenkins-scripts/docker/lib/docker_generate_dockerfile.bash @@ -143,9 +143,12 @@ if [[ -z ${OSRF_REPOS_TO_USE} ]]; then fi fi +# Enable shell on errors is designed to help debuging but never +# to be run on Jenkins. +SHELL_ON_ERRORS=${SHELL_ON_ERRORS:-false} + echo '# BEGIN SECTION: create the Dockerfile' cat > Dockerfile << DELIM_DOCKER -#!/bin/bash ####################################################### # Docker file to run build.sh @@ -174,8 +177,8 @@ fi # The redirection fails too many times using us ftp if [[ ${LINUX_DISTRO} == 'debian' ]]; then cat >> Dockerfile << DELIM_DEBIAN_APT - RUN sed -i -e 's:httpredir:ftp.us:g' /etc/apt/sources.list - RUN echo "deb-src ${SOURCE_LIST_URL} ${DISTRO} main" >> /etc/apt/sources.list + RUN sed -i -e 's/URIs: .*/URIs: http:\/\/ftp.us.debian.org\/debian/g' /etc/apt/sources.list.d/debian.sources + RUN sed -i -e 's/Types: deb/Types: deb deb-src/' /etc/apt/sources.list.d/debian.sources DELIM_DEBIAN_APT fi @@ -331,17 +334,6 @@ RUN (apt-get update || (rm -rf /var/lib/apt/lists/* && apt-get update)) \ RUN mkdir -p ${WORKSPACE} DELIM_DOCKER31 -# Beware of moving this code since it needs to run update-alternative after -# installing the default compiler in PACKAGES_CACHE_AND_CHECK_UPDATES -if ${INSTALL_C17_COMPILER}; then -cat >> Dockerfile << DELIM_GCC8 - RUN apt-get update \\ - && apt-get install -y g++-8 \\ - && rm -rf /var/lib/apt/lists/* \\ - && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8 -DELIM_GCC8 -fi - if ${USE_SQUID}; then cat >> Dockerfile << DELIM_DOCKER_SQUID # If host is running squid-deb-proxy on port 8000, populate /etc/apt/apt.conf.d/30proxy diff --git a/jenkins-scripts/docker/lib/gazebo_ros_pkgs-check-release.bash b/jenkins-scripts/docker/lib/gazebo_ros_pkgs-check-release.bash index f731d76ba..6b7641c0e 100644 --- a/jenkins-scripts/docker/lib/gazebo_ros_pkgs-check-release.bash +++ b/jenkins-scripts/docker/lib/gazebo_ros_pkgs-check-release.bash @@ -9,6 +9,7 @@ export ENABLE_REAPER=false DOCKER_JOB_NAME="gazebo_ros_pkgs_ci" . ${SCRIPT_DIR}/lib/boilerplate_prepare.sh +. ${SCRIPT_DIR}/lib/_common_scripts.bash . ${SCRIPT_DIR}/lib/_gazebo_utils.sh ROS_SETUP_PREINSTALL_HOOK=""" @@ -20,7 +21,8 @@ ${GAZEBO_MODEL_INSTALLATION} if ${ROS2}; then cat > build.sh << DELIM_CHECKOUT -set -ex +$(generate_buildsh_header) + source /opt/ros/${ROS_DISTRO}/setup.bash TEST_TIMEOUT=90 @@ -36,10 +38,7 @@ fi DELIM_CHECKOUT else cat > build.sh << DELIM_CHECKOUT -################################################### -# Make project-specific changes here -# -set -ex +$(generate_buildsh_header) [[ -d ${WORKSPACE}/gazebo_ros_demos ]] && rm -fr ${WORKSPACE}/gazebo_ros_demos git clone https://github.com/ros-simulation/gazebo_ros_demos ${WORKSPACE}/gazebo_ros_demos diff --git a/jenkins-scripts/docker/lib/generic-abi-base.bash b/jenkins-scripts/docker/lib/generic-abi-base.bash index 7c4c551fd..c24ae0fea 100644 --- a/jenkins-scripts/docker/lib/generic-abi-base.bash +++ b/jenkins-scripts/docker/lib/generic-abi-base.bash @@ -25,6 +25,7 @@ echo '# BEGIN SECTION: setup the testing enviroment' # Define the name to be used in docker DOCKER_JOB_NAME="abi_job" . ${SCRIPT_DIR}/lib/boilerplate_prepare.sh +. ${SCRIPT_DIR}/lib/_common_scripts.bash echo '# END SECTION' # Could be empty, just fine @@ -44,12 +45,7 @@ if [[ "${NEED_C17_COMPILER}" == "true" ]]; then fi cat > build.sh << DELIM -#!/bin/bash - -################################################### -# Make project-specific changes here -# -set -ex +$(generate_buildsh_header) if [ `expr length "${ABI_JOB_PRECHECKER_HOOK} "` -gt 1 ]; then echo '# BEGIN SECTION: running pre ABI hook' diff --git a/jenkins-scripts/docker/lib/generic-install-base.bash b/jenkins-scripts/docker/lib/generic-install-base.bash index 8a944ca00..b679e7b86 100644 --- a/jenkins-scripts/docker/lib/generic-install-base.bash +++ b/jenkins-scripts/docker/lib/generic-install-base.bash @@ -9,12 +9,7 @@ DOCKER_JOB_NAME="install_job" echo '# END SECTION' cat > build.sh << DELIM -#!/bin/bash - -################################################### -# Make project-specific changes here -# -set -ex +$(generate_buildsh_header) if [ `expr length "${INSTALL_JOB_PREINSTALL_HOOK} "` -gt 1 ]; then echo '# BEGIN SECTION: running pre install hook' diff --git a/jenkins-scripts/docker/lib/gzdev-base-linux.bash b/jenkins-scripts/docker/lib/gzdev-base-linux.bash index 7deb198a9..18824025c 100644 --- a/jenkins-scripts/docker/lib/gzdev-base-linux.bash +++ b/jenkins-scripts/docker/lib/gzdev-base-linux.bash @@ -1,14 +1,12 @@ echo '# BEGIN SECTION: setup the testing enviroment' export DOCKER_JOB_NAME="gzdev" . "${SCRIPT_DIR}/lib/boilerplate_prepare.sh" +. "${SCRIPT_DIR}/lib/_common_scripts.bash" +. "${SCRIPT_DIR}/lib/_install_nvidia_docker.sh" echo '# END SECTION' -. ${SCRIPT_DIR}/lib/_install_nvidia_docker.sh - cat > build.sh << DELIM -################################################### -# -set -ex +$(generate_buildsh_header) export MAKE_JOBS=${MAKE_JOBS} export DISPLAY=${DISPLAY} diff --git a/jenkins-scripts/dsl/debian.dsl b/jenkins-scripts/dsl/debian.dsl index 55160bf25..771ea89b6 100644 --- a/jenkins-scripts/dsl/debian.dsl +++ b/jenkins-scripts/dsl/debian.dsl @@ -2,87 +2,6 @@ import _configs_.* import javaposse.jobdsl.dsl.Job Globals.default_emails = "jrivero@osrfoundation.org" - -packages = [:] -packages['science-team'] = ['console-bridge', - 'gazebo', - 'fcl', - 'ignition-cmake', - 'ignition-common', - 'ignition-math2', - 'ignition-math4', - 'ignition-msgs', - 'ignition-tools', - 'ignition-transport', // version 4 - 'dart', - 'libccd', - 'octomap', - 'sdformat', // version 6 - 'simbody', - 'urdfdom', - 'urdfdom-headers' ] - -packages['jrivero-guest'] = ['empy'] - - -packages.each { repo_name, pkgs -> - pkgs.each { pkg -> - - // -------------------------------------------------------------- - // 2. Create the job that tries to build the package and run lintian - def ci_job = job("${pkg}-pkg_builder-master-debian_sid-amd64") - OSRFLinuxBuildPkgBase.create(ci_job) - ci_job.with - { - scm { - git { - remote { - url("https://salsa.debian.org/${repo_name}/${pkg}.git") - } - extensions { - cleanBeforeCheckout() - relativeTargetDirectory('repo') - } - - branch('refs/heads/master') - } - } - - properties { - priority 350 - } - - parameters { - textParam("RELEASE_VERSION", null, "osrfX, OSRF postix version") - textParam("RELEASE_ARCH_VERSION", null, "~ARCH-X, release version") - } - - steps { - shell("""\ - #!/bin/bash -xe - - export LINUX_DISTRO=debian - export DISTRO=sid - - /bin/bash -xe ./scripts/jenkins-scripts/docker/debian-git-debbuild.bash - """.stripIndent()) - } - - publishers - { - // Added the lintian parser - configure { project -> - project / publishers << 'hudson.plugins.logparser.LogParserPublisher' { - unstableOnWarning true - failBuildOnError false - parsingRulesPath('/var/lib/jenkins/logparser_lintian') - } - } - } - } - } -} - // ratt package to help during transition def ratt_pkg_job = job("debian-ratt-builder") OSRFLinuxBase.create(ratt_pkg_job) diff --git a/jenkins-scripts/dsl/gz-collections.yaml b/jenkins-scripts/dsl/gz-collections.yaml index e1448e379..11a6cb6cf 100644 --- a/jenkins-scripts/dsl/gz-collections.yaml +++ b/jenkins-scripts/dsl/gz-collections.yaml @@ -436,9 +436,6 @@ collections: linux: ignore_major_version: - gz-ionic - nightly: - distros: - - noble - name: '__upcoming__' libs: - name: gz-tools @@ -446,63 +443,63 @@ collections: repo: current_branch: main - name: gz-cmake - major_version: 4 + major_version: 5 repo: current_branch: main - name: gz-common - major_version: 6 + major_version: 7 repo: current_branch: main - name: gz-fuel-tools - major_version: 10 + major_version: 11 repo: current_branch: main - name: gz-gui - major_version: 9 + major_version: 10 repo: current_branch: main - name: gz-launch - major_version: 8 + major_version: 9 repo: current_branch: main - name: gz-math - major_version: 8 + major_version: 9 repo: current_branch: main - name: gz-msgs - major_version: 11 + major_version: 12 repo: current_branch: main - name: gz-physics - major_version: 8 + major_version: 9 repo: current_branch: main - name: gz-plugin - major_version: 3 + major_version: 4 repo: current_branch: main - name: gz-rendering - major_version: 9 + major_version: 10 repo: current_branch: main - name: gz-sensors - major_version: 9 + major_version: 10 repo: current_branch: main - name: gz-sim - major_version: 9 + major_version: 10 repo: current_branch: main - name: gz-transport - major_version: 14 + major_version: 15 repo: current_branch: main - name: gz-utils - major_version: 3 + major_version: 4 repo: current_branch: main - name: sdformat - major_version: 15 + major_version: 16 repo: current_branch: main ci: @@ -514,6 +511,10 @@ collections: configs: - noble - brew + linux: + nightly: + distros: + - noble ci_configs: - name: focal system: diff --git a/jenkins-scripts/dsl/ignition_collection.dsl b/jenkins-scripts/dsl/ignition_collection.dsl index e00232093..f214e5a9b 100644 --- a/jenkins-scripts/dsl/ignition_collection.dsl +++ b/jenkins-scripts/dsl/ignition_collection.dsl @@ -11,7 +11,7 @@ arch = 'amd64' file = readFileFromWorkspace("scripts/jenkins-scripts/dsl/gz-collections.yaml") gz_collections_yaml = new Yaml().load(file) -gz_nightly = 'ionic' +gz_nightly = '__upcoming__' String get_debbuilder_name(parsed_yaml_lib, parsed_yaml_packaging) { diff --git a/jenkins-scripts/dsl/logs/generated_jobs.txt b/jenkins-scripts/dsl/logs/generated_jobs.txt index c15a66b28..3d9a4f562 100644 --- a/jenkins-scripts/dsl/logs/generated_jobs.txt +++ b/jenkins-scripts/dsl/logs/generated_jobs.txt @@ -392,38 +392,38 @@ branch_ci ionic gz_utils-ci-gz-utils3-noble-amd64 branch_ci ionic sdformat-ci-sdf15-homebrew-amd64 branch_ci ionic sdformat-ci-sdf15-noble-amd64 branch_ci ionic sdformat-sdf15-win -install_ci __upcoming__ gz_cmake4-install-pkg-noble-amd64 -install_ci __upcoming__ gz_cmake4-install_bottle-homebrew-amd64 -install_ci __upcoming__ gz_common6-install-pkg-noble-amd64 -install_ci __upcoming__ gz_common6-install_bottle-homebrew-amd64 -install_ci __upcoming__ gz_fuel_tools10-install-pkg-noble-amd64 -install_ci __upcoming__ gz_fuel_tools10-install_bottle-homebrew-amd64 -install_ci __upcoming__ gz_gui9-install-pkg-noble-amd64 -install_ci __upcoming__ gz_gui9-install_bottle-homebrew-amd64 -install_ci __upcoming__ gz_launch8-install-pkg-noble-amd64 -install_ci __upcoming__ gz_launch8-install_bottle-homebrew-amd64 -install_ci __upcoming__ gz_math8-install-pkg-noble-amd64 -install_ci __upcoming__ gz_math8-install_bottle-homebrew-amd64 -install_ci __upcoming__ gz_msgs11-install-pkg-noble-amd64 -install_ci __upcoming__ gz_msgs11-install_bottle-homebrew-amd64 -install_ci __upcoming__ gz_physics8-install-pkg-noble-amd64 -install_ci __upcoming__ gz_physics8-install_bottle-homebrew-amd64 -install_ci __upcoming__ gz_plugin3-install-pkg-noble-amd64 -install_ci __upcoming__ gz_plugin3-install_bottle-homebrew-amd64 -install_ci __upcoming__ gz_rendering9-install-pkg-noble-amd64 -install_ci __upcoming__ gz_rendering9-install_bottle-homebrew-amd64 -install_ci __upcoming__ gz_sensors9-install-pkg-noble-amd64 -install_ci __upcoming__ gz_sensors9-install_bottle-homebrew-amd64 -install_ci __upcoming__ gz_sim9-install-pkg-noble-amd64 -install_ci __upcoming__ gz_sim9-install_bottle-homebrew-amd64 +install_ci __upcoming__ gz_cmake5-install-pkg-noble-amd64 +install_ci __upcoming__ gz_cmake5-install_bottle-homebrew-amd64 +install_ci __upcoming__ gz_common7-install-pkg-noble-amd64 +install_ci __upcoming__ gz_common7-install_bottle-homebrew-amd64 +install_ci __upcoming__ gz_fuel_tools11-install-pkg-noble-amd64 +install_ci __upcoming__ gz_fuel_tools11-install_bottle-homebrew-amd64 +install_ci __upcoming__ gz_gui10-install-pkg-noble-amd64 +install_ci __upcoming__ gz_gui10-install_bottle-homebrew-amd64 +install_ci __upcoming__ gz_launch9-install-pkg-noble-amd64 +install_ci __upcoming__ gz_launch9-install_bottle-homebrew-amd64 +install_ci __upcoming__ gz_math9-install-pkg-noble-amd64 +install_ci __upcoming__ gz_math9-install_bottle-homebrew-amd64 +install_ci __upcoming__ gz_msgs12-install-pkg-noble-amd64 +install_ci __upcoming__ gz_msgs12-install_bottle-homebrew-amd64 +install_ci __upcoming__ gz_physics9-install-pkg-noble-amd64 +install_ci __upcoming__ gz_physics9-install_bottle-homebrew-amd64 +install_ci __upcoming__ gz_plugin4-install-pkg-noble-amd64 +install_ci __upcoming__ gz_plugin4-install_bottle-homebrew-amd64 +install_ci __upcoming__ gz_rendering10-install-pkg-noble-amd64 +install_ci __upcoming__ gz_rendering10-install_bottle-homebrew-amd64 +install_ci __upcoming__ gz_sensors10-install-pkg-noble-amd64 +install_ci __upcoming__ gz_sensors10-install_bottle-homebrew-amd64 +install_ci __upcoming__ gz_sim10-install-pkg-noble-amd64 +install_ci __upcoming__ gz_sim10-install_bottle-homebrew-amd64 install_ci __upcoming__ gz_tools3-install-pkg-noble-amd64 install_ci __upcoming__ gz_tools3-install_bottle-homebrew-amd64 -install_ci __upcoming__ gz_transport14-install-pkg-noble-amd64 -install_ci __upcoming__ gz_transport14-install_bottle-homebrew-amd64 -install_ci __upcoming__ gz_utils3-install-pkg-noble-amd64 -install_ci __upcoming__ gz_utils3-install_bottle-homebrew-amd64 -install_ci __upcoming__ sdformat15-install-pkg-noble-amd64 -install_ci __upcoming__ sdformat15-install_bottle-homebrew-amd64 +install_ci __upcoming__ gz_transport15-install-pkg-noble-amd64 +install_ci __upcoming__ gz_transport15-install_bottle-homebrew-amd64 +install_ci __upcoming__ gz_utils4-install-pkg-noble-amd64 +install_ci __upcoming__ gz_utils4-install_bottle-homebrew-amd64 +install_ci __upcoming__ sdformat16-install-pkg-noble-amd64 +install_ci __upcoming__ sdformat16-install_bottle-homebrew-amd64 install_ci citadel gz_citadel-install-pkg-focal-amd64 install_ci citadel gz_citadel-install_bottle-homebrew-amd64 install_ci citadel gz_cmake2-install-pkg-focal-amd64 diff --git a/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash b/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash index 0b86233bd..3c7c02ac3 100644 --- a/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash +++ b/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash @@ -88,12 +88,20 @@ fi if [[ -n "${PIP_PACKAGES_NEEDED}" ]]; then brew install python3 - PIP=pip3 - if ! which ${PIP}; then - PIP=${HOMEBREW_PREFIX}/opt/python/bin/pip3 - fi - # TODO use a python3 venv instead. - ${PIP} install --break-system-packages ${PIP_PACKAGES_NEEDED} + # reset command hash since python3 has already been invoked in this script + hash -r + rm -rf ${WORKSPACE}/venv + python3 -m venv ${WORKSPACE}/venv + . ${WORKSPACE}/venv/bin/activate + pip3 install ${PIP_PACKAGES_NEEDED} + # For python 3.X, our formulae install python bindings to + # ${HOMEBREW_PREFIX}/lib/python3.X/site-packages + # so add that folder to PYTHONPATH + python_minor_version=$(python3 -c 'import sys; print(sys.version_info[1])') + export PYTHONPATH=${HOMEBREW_PREFIX}/lib/python3.$python_minor_version/site-packages:$PYTHONPATH + # also add the venv site-packages to PYTHONPATH + # this seems to be needed by the gz-sim python system loader test + export PYTHONPATH=${WORKSPACE}/venv/lib/python3.$python_minor_version/site-packages:$PYTHONPATH fi if [[ -z "${DISABLE_CCACHE}" ]]; then diff --git a/release.py b/release.py index 111d147f0..88708c84b 100755 --- a/release.py +++ b/release.py @@ -562,7 +562,7 @@ def get_vendor_repo_url(package_name) -> str: return f"{protocol}/{get_vendor_github_repo(package_name)}" -def prepare_vendor_pr_temp_workspace(package_name, ws_dir) -> Tuple[str, str, str]: +def prepare_vendor_pr_temp_workspace(package_name, ros_distro, ws_dir) -> Tuple[str, str, str]: gz_vendor_tool = os.path.join(ws_dir, "gz_vendor") # Create virtualenv for vendor dependencies venv_dir = os.path.join(ws_dir, "venv") @@ -575,7 +575,7 @@ def prepare_vendor_pr_temp_workspace(package_name, ws_dir) -> Tuple[str, str, st gz_vendor_tool] _, _err_tool = check_call(cmd, IGNORE_DRY_RUN) gz_vendor_repo = os.path.join(ws_dir, 'gz_vendor_repo') - cmd = ['git', 'clone', '-q', + cmd = ['git', 'clone', '-q', '-b', ros_distro, get_vendor_repo_url(package_name), gz_vendor_repo] _, _err_repo = check_call(cmd, IGNORE_DRY_RUN) @@ -656,7 +656,7 @@ def create_pr_in_gz_vendor_repo(args, ros_distro) -> str: ws_dir = tempfile.mkdtemp() # Prepare the temporary workspace vendor_tool_path, vendor_repo_path, venv_dir = \ - prepare_vendor_pr_temp_workspace(args.package, ws_dir) + prepare_vendor_pr_temp_workspace(args.package, ros_distro, ws_dir) # Run updating script on the temporary workspace execute_update_vendor_package_tool( vendor_tool_path, vendor_repo_path, venv_dir)