Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions create_jenkins_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ def main(argv=None):
'linux-aarch64': {
'label_expression': 'linux_aarch64',
'shell_type': 'Shell',
'ignore_rmw_default': data['ignore_rmw_default'] | {'rmw_connextdds'},
'ignore_rmw_default': data['ignore_rmw_default'],
'use_connext_debs_default': 'true',
'test_args_default': re.sub(r'(--ctest-args +-LE +)"?([^ "]+)"?', r'\1"(mimick|\2)"', data['test_args_default']),
},
'linux-rhel': {
Expand Down Expand Up @@ -206,8 +207,6 @@ def create_job(os_name, job_name, template_file, additional_dict):

# configure a manual version of the packaging job
ignore_rmw_default_packaging = set()
if os_name in ['linux-aarch64']:
ignore_rmw_default_packaging |= {'rmw_connextdds'}
create_job(os_name, 'ci_packaging_' + os_name, 'packaging_job.xml.em', {
'cmake_build_type': 'RelWithDebInfo',
'label_expression': packaging_label_expression,
Expand Down
16 changes: 9 additions & 7 deletions linux_docker_resources/Dockerfile
Comment thread
fgallegosalido marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,17 @@ RUN pip3 install -U git+https://github.com/ahcorde/lcov-to-cobertura-xml@master

# Install the Connext binary from the OSRF repositories. if ROS_DISTRO is humble or jazzy
# install rti-connext-dds-6.0.1 else install rti-connext-dds-7.3.0-ros.
RUN if test \( ${PLATFORM} = x86 -a ${INSTALL_CONNEXT_DEBS} = true \); then \
if test \( ${ROS_DISTRO} = humble -o ${ROS_DISTRO} = jazzy \); then \
RUN \
if test ${INSTALL_CONNEXT_DEBS} = true; then \
if test \( ${PLATFORM} = x86 -a \( ${ROS_DISTRO} = humble -o ${ROS_DISTRO} = jazzy \) \); then \
Comment thread
fgallegosalido marked this conversation as resolved.
Outdated
apt-get update && RTI_NC_LICENSE_ACCEPTED=yes apt-get install -y rti-connext-dds-6.0.1; \
else \
apt-get update && RTI_NC_LICENSE_ACCEPTED=yes apt-get install -y rti-connext-dds-7.3.0-ros; \
fi; \
fi
fi

# Install the RTI dependencies.
RUN if test ${PLATFORM} = x86; then apt-get update && apt-get install --no-install-recommends -y default-jre-headless; fi
RUN apt-get update && apt-get install --no-install-recommends -y default-jre-headless

# Install dependencies for RTI web binaries install script.
RUN apt-get update && apt-get install --no-install-recommends -y python3-pexpect
Expand All @@ -174,20 +175,21 @@ RUN apt-get update && apt-get install --no-install-recommends -y python3-pexpect
COPY rticonnextdds-src/ /tmp/rticonnextdds-src

# Join the correct Connext version files based on the value of ROS_DISTRO.
RUN if test ${ROS_DISTRO} = jazzy -o ${ROS_DISTRO} = humble; then \
RUN \
if test ${ROS_DISTRO} = jazzy -o ${ROS_DISTRO} = humble; then \
Comment thread
fgallegosalido marked this conversation as resolved.
Outdated
for splitpkg in \
/tmp/rticonnextdds-src/rti_connext_dds-6.0.1-pro-host-x64Linux.run \
/tmp/rticonnextdds-src/rti_connext_dds-6.0.1.25-pro-host-x64Linux.rtipkg \
/tmp/rticonnextdds-src/rti_connext_dds-6.0.1.25-pro-target-x64Linux4gcc7.3.0.rtipkg; do \
cat $(echo ${splitpkg}.0?? | sort) > $splitpkg; \
done; \
else \
else \
for splitpkg in \
/tmp/rticonnextdds-src/rti_connext_dds-7.3.0-pro-host-x64Linux.run \
/tmp/rticonnextdds-src/rti_connext_dds-7.3.0-pro-target-x64Linux4gcc7.3.0.rtipkg; do \
cat $(echo ${splitpkg}.0?? | sort) > $splitpkg; \
done; \
fi
fi

# Make the RTI Connext installation script executable. For any version of Connext.
RUN chmod 755 /tmp/rticonnextdds-src/rti_connext_dds-*-pro-host-x64Linux.run
Expand Down
142 changes: 86 additions & 56 deletions linux_docker_resources/entry_point.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,15 @@ echo "done."
. /etc/os-release
VERSION_ID_MAJOR=$(echo $VERSION_ID | sed 's/\..*//')

# We only attempt to install Connext on Ubuntu amd64
if [ "${ARCH}" = "x86_64" -a "${ID}" = "ubuntu" ]; then
# Function to install Connext DDS.
install_connextdds() {
# We only attempt to install Connext on Ubuntu
if [ "${ID}" != "ubuntu" ]; then
echo "Connext installation is only supported on Ubuntu. Skipping Connext installation."
return 0
fi

# Check if the "ignore-rmw" CI argument contains "rmw_connextdds".
IGNORE_CONNEXTDDS=""
ignore_rwm_seen="false"
for arg in ${CI_ARGS} ; do
Expand All @@ -38,66 +45,89 @@ if [ "${ARCH}" = "x86_64" -a "${ID}" = "ubuntu" ]; then
done

# Install RTI Connext DDS if we didn't find 'rmw_connextdds' within the "ignore-rmw" option strings.
if [ -z "${IGNORE_CONNEXTDDS}" ]; then
echo "Installing Connext..."

export CONNEXT_FULL_VERSION="7.3.0"
export CONNEXT_DISPLAY_VERSION="$CONNEXT_FULL_VERSION"
if [ "${ROS_DISTRO}" = "jazzy" ] || [ "${ROS_DISTRO}" = "humble" ]; then
export CONNEXT_FULL_VERSION="6.0.1.25"
export CONNEXT_DISPLAY_VERSION="${CONNEXT_FULL_VERSION%.*}"
if [ -n "${IGNORE_CONNEXTDDS}" ]; then
Comment thread
fgallegosalido marked this conversation as resolved.
Outdated
echo "Ignoring installation of Connext."
return 0
fi

echo "Installing Connext..."
export CONNEXT_FULL_VERSION="7.3.0"
export CONNEXT_DISPLAY_VERSION="$CONNEXT_FULL_VERSION"
if [ "${ROS_DISTRO}" = "jazzy" ] || [ "${ROS_DISTRO}" = "humble" ]; then
export CONNEXT_FULL_VERSION="6.0.1.25"
export CONNEXT_DISPLAY_VERSION="${CONNEXT_FULL_VERSION%.*}"
fi

case "${CI_ARGS}" in
*--connext-debs*)
connext_installation_dir="/opt/rti.com/rti_connext_dds-${CONNEXT_DISPLAY_VERSION}"
setenv_script_dir="${connext_installation_dir}/resource/scripts"

# Installing Connext through Debian packages is supported on both x86_64 and aarch64 architectures. If we're on an unsupported architecture, skip the installation.
echo "Using Debian package of Connext"
if test -r ${setenv_script_dir}/rtisetenv_x64Linux4gcc7.3.0.sh; then
echo "Sourcing RTI setenv script ${setenv_script_dir}/rtisetenv_x64Linux4gcc7.3.0.sh"
. ${setenv_script_dir}/rtisetenv_x64Linux4gcc7.3.0.sh
elif test -r ${setenv_script_dir}/rtisetenv_armv8Linux4gcc7.3.0.sh; then
echo "Sourcing RTI setenv script ${setenv_script_dir}/rtisetenv_armv8Linux4gcc7.3.0.sh"
. ${setenv_script_dir}/rtisetenv_armv8Linux4gcc7.3.0.sh
else
echo "No Connext installation through Debian packages found. Skipping Connext installation."
return 0
fi
;;
*)
# Support for installing Connext through the RTI website installers is only supported on
# x86_64 architecture. If we're on a different architecture, skip the installation.
if [ "${ARCH}" != "x86_64" ]; then
echo "Connext through RTI packages is only supported on amd64 architecture. Skipping Connext installation."
return 0
fi

case "${CI_ARGS}" in
*--connext-debs*)
echo "Using Debian package of Connext"
if test -r /opt/rti.com/rti_connext_dds-${CONNEXT_DISPLAY_VERSION}/resource/scripts/rtisetenv_x64Linux4gcc7.3.0.sh; then
echo "Sourcing RTI setenv script /opt/rti.com/rti_connext_dds-${CONNEXT_DISPLAY_VERSION}/resource/scripts/rtisetenv_x64Linux4gcc7.3.0.sh"
. /opt/rti.com/rti_connext_dds-${CONNEXT_DISPLAY_VERSION}/resource/scripts/rtisetenv_x64Linux4gcc7.3.0.sh
fi
;;
*)
echo "Installing Connext binaries off RTI website..."
if test -x /tmp/rticonnextdds-src/rti_connext_dds-${CONNEXT_DISPLAY_VERSION}-pro-host-x64Linux.run; then
echo "Installing Connext binaries off RTI website..."
if test -x /tmp/rticonnextdds-src/rti_connext_dds-${CONNEXT_DISPLAY_VERSION}-pro-host-x64Linux.run; then
rtipkg_list="\
/tmp/rticonnextdds-src/openssl-3.0.12-${CONNEXT_FULL_VERSION}-host-x64Linux.rtipkg \
/tmp/rticonnextdds-src/openssl-3.0.12-${CONNEXT_FULL_VERSION}-target-x64Linux4gcc7.3.0.rtipkg \
/tmp/rticonnextdds-src/rti_security_plugins-${CONNEXT_FULL_VERSION}-host-openssl-3.0-x64Linux.rtipkg \
/tmp/rticonnextdds-src/rti_security_plugins-${CONNEXT_FULL_VERSION}-target-openssl-3.0-x64Linux4gcc7.3.0.rtipkg \
"
connext_base_architecture="x64Linux3gcc4.8.2"
if [ "${CONNEXT_FULL_VERSION}" = "6.0.1.25" ]; then
rtipkg_list="\
/tmp/rticonnextdds-src/openssl-3.0.12-${CONNEXT_FULL_VERSION}-host-x64Linux.rtipkg \
/tmp/rticonnextdds-src/openssl-3.0.12-${CONNEXT_FULL_VERSION}-target-x64Linux4gcc7.3.0.rtipkg \
/tmp/rticonnextdds-src/rti_security_plugins-${CONNEXT_FULL_VERSION}-host-openssl-3.0-x64Linux.rtipkg \
/tmp/rticonnextdds-src/rti_security_plugins-${CONNEXT_FULL_VERSION}-target-openssl-3.0-x64Linux4gcc7.3.0.rtipkg \
/tmp/rticonnextdds-src/rti_connext_dds-${CONNEXT_FULL_VERSION}-pro-host-x64Linux.rtipkg \
/tmp/rticonnextdds-src/openssl-1.1.1k-${CONNEXT_FULL_VERSION}-host-x64Linux.rtipkg \
/tmp/rticonnextdds-src/rti_security_plugins-${CONNEXT_FULL_VERSION}-host-x64Linux.rtipkg \
/tmp/rticonnextdds-src/rti_security_plugins-${CONNEXT_FULL_VERSION}-target-x64Linux4gcc7.3.0.rtipkg \
"
connext_base_architecture="x64Linux3gcc4.8.2"
if [ "${CONNEXT_FULL_VERSION}" = "6.0.1.25" ]; then
rtipkg_list="\
/tmp/rticonnextdds-src/rti_connext_dds-${CONNEXT_FULL_VERSION}-pro-host-x64Linux.rtipkg \
/tmp/rticonnextdds-src/openssl-1.1.1k-${CONNEXT_FULL_VERSION}-host-x64Linux.rtipkg \
/tmp/rticonnextdds-src/rti_security_plugins-${CONNEXT_FULL_VERSION}-host-x64Linux.rtipkg \
/tmp/rticonnextdds-src/rti_security_plugins-${CONNEXT_FULL_VERSION}-target-x64Linux4gcc7.3.0.rtipkg \
"
connext_base_architecture="x64Linux2.6gcc4.4.5"
fi
python3 -u /tmp/rti_web_binaries_install_script.py /tmp/rticonnextdds-src/rti_connext_dds-${CONNEXT_DISPLAY_VERSION}-pro-host-x64Linux.run \
/home/rosbuild/rti_connext_dds-${CONNEXT_DISPLAY_VERSION} --rtipkg_paths \
/tmp/rticonnextdds-src/rti_connext_dds-${CONNEXT_FULL_VERSION}-pro-target-x64Linux4gcc7.3.0.rtipkg \
$rtipkg_list
if [ $? -ne 0 ]; then
echo "Connext not installed correctly (maybe you're on an ARM machine?)." >&2
exit 1
fi
export CONNEXTDDS_DIR=/home/rosbuild/rti_connext_dds-${CONNEXT_DISPLAY_VERSION}
export RTI_OPENSSL_LIBS=$CONNEXTDDS_DIR/resource/app/lib/${connext_base_architecture}
else
echo "No connext installation files found found." >&2
exit 1
connext_base_architecture="x64Linux2.6gcc4.4.5"
fi
mv /tmp/rti_license.dat /home/rosbuild/rti_license.dat
export RTI_LICENSE_FILE=/home/rosbuild/rti_license.dat
;;
esac
echo "done."
else
echo "NOT installing Connext."
fi
python3 -u /tmp/rti_web_binaries_install_script.py /tmp/rticonnextdds-src/rti_connext_dds-${CONNEXT_DISPLAY_VERSION}-pro-host-x64Linux.run \
/home/rosbuild/rti_connext_dds-${CONNEXT_DISPLAY_VERSION} --rtipkg_paths \
/tmp/rticonnextdds-src/rti_connext_dds-${CONNEXT_FULL_VERSION}-pro-target-x64Linux4gcc7.3.0.rtipkg \
$rtipkg_list
if [ $? -ne 0 ]; then
echo "Connext not installed correctly (maybe you're on an ARM machine?)." >&2
return 1
fi
export CONNEXTDDS_DIR=/home/rosbuild/rti_connext_dds-${CONNEXT_DISPLAY_VERSION}
export RTI_OPENSSL_LIBS=$CONNEXTDDS_DIR/resource/app/lib/${connext_base_architecture}
else
echo "No connext installation files found found." >&2
return 1
fi
mv /tmp/rti_license.dat /home/rosbuild/rti_license.dat
export RTI_LICENSE_FILE=/home/rosbuild/rti_license.dat
;;
esac
return 0
}

if ! install_connextdds; then
echo "Connext installation failed. Exiting." >&2
exit 1
fi
echo "done."

echo "Fixing permissions..."
sed -i -e "s/:$ORIG_UID:$ORIG_GID:/:$UID:$GID:/" /etc/passwd
Expand Down