Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@
path = linux_docker_resources/rticonnextdds-license
url = [email protected]:osrf/rticonnextdds-src.git
branch = license
[submodule "windows_docker_resources/rticonnextdds-src"]
path = windows_docker_resources/rticonnextdds-src
url = [email protected]:osrf/rticonnextdds-src.git
branch = binaries/windows/amd64/5.3.1
[submodule "windows_docker_resources/rticonnextdds-license"]
path = windows_docker_resources/rticonnextdds-license
url = [email protected]:osrf/rticonnextdds-src.git
branch = license
8 changes: 3 additions & 5 deletions job_templates/ci_job.xml.em
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,16 @@
<url></url>
</browser>
<submoduleCfg class="list"/>
<extensions>@
@[if os_name != 'windows']
<extensions>
<hudson.plugins.git.extensions.impl.SubmoduleOption>
<disableSubmodules>false</disableSubmodules>
<recursiveSubmodules>true</recursiveSubmodules>
<trackingSubmodules>false</trackingSubmodules>
<reference/>
<parentCredentials>false</parentCredentials>
<parentCredentials>true</parentCredentials>
<shallow>false</shallow>
</hudson.plugins.git.extensions.impl.SubmoduleOption>
@
@[end if]</extensions>
</extensions>
</scm>
<assignedNode>@(label_expression)</assignedNode>
<canRoam>false</canRoam>
Expand Down
8 changes: 3 additions & 5 deletions job_templates/packaging_job.xml.em
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,16 @@ All packages listed here have to be available from either the primary or supplem
<url></url>
</browser>
<submoduleCfg class="list"/>
<extensions>@
@[if os_name != 'windows']
<extensions>
<hudson.plugins.git.extensions.impl.SubmoduleOption>
<disableSubmodules>false</disableSubmodules>
<recursiveSubmodules>true</recursiveSubmodules>
<trackingSubmodules>false</trackingSubmodules>
<reference/>
<parentCredentials>false</parentCredentials>
<parentCredentials>true</parentCredentials>
<shallow>false</shallow>
</hudson.plugins.git.extensions.impl.SubmoduleOption>
@
@[end if]</extensions>
</extensions>
</scm>
<assignedNode>@(label_expression)</assignedNode>
<canRoam>false</canRoam>
Expand Down
6 changes: 4 additions & 2 deletions ros2_batch_job/windows_batch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ def setup_env(self):
# Try to find the OpenSplice env file
opensplice_env_file = None
if 'rmw_opensplice_cpp' not in self.args.ignore_rmw:
opensplice_env_file = os.path.join(
os.path.abspath(os.sep), 'dev', 'opensplice', 'HDE', 'x86_64.win64', 'release.bat')
default_home = os.path.join(
os.path.abspath(os.sep), 'dev', 'opensplice', 'HDE', 'x86_64.win64')
ospl_home = os.environ.get('OSPL_HOME', default_home)
opensplice_env_file = os.path.join(ospl_home, 'release.bat')
if not os.path.exists(opensplice_env_file):
warn("Asked to use OpenSplice but the env file was not found at '{0}'".format(
opensplice_env_file))
Expand Down
141 changes: 141 additions & 0 deletions windows_docker_resources/Dockerfile.msvc2019
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# escape=`
# This Dockerfile needs to be built from the parent directory (ros2/ci) so the build context
# includes the python scripts

# To find this value run in powershell:
# $(Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').ReleaseId
ARG WINDOWS_RELEASE_ID=1909
ARG TODAYS_DATE=0

# Indicates that the windows image will be used as the base image. Must be same or older than host.
# --isolation=hyperv is needed for both build/run if the image id is older than the host id
# Use --isolation=process if you need to build in a mounted volume
FROM mcr.microsoft.com/windows:$WINDOWS_RELEASE_ID

# These are versioned files, so they shouldn't invalidate caches. Renaming to fixed names.
# Regularly updated installers are next to their associated code.
ADD https://github.com/ADLINK-IST/opensplice/releases/download/OSPL_V6_9_190925OSS_RELEASE/PXXX-VortexOpenSplice-6.9.190925OSS-HDE-x86_64.win-vs2019-installer.zip C:\TEMP\OpenSplice.zip

# OpenSSL
ADD https://slproweb.com/download/Win64OpenSSL-1_0_2u.exe C:\TEMP\Win64OpenSSL.exe

# OpenCV
ADD https://github.com/ros2/ros2/releases/download/opencv-archives/opencv-3.4.6-vc16.VS2019.zip C:\TEMP\opencv.zip

# Python 3.7
ADD https://www.python.org/ftp/python/3.7.6/python-3.7.6-amd64.exe C:\TEMP\python-37.exe

# Custom choco packages
ADD https://github.com/ros2/choco-packages/releases/download/2019-10-24/asio.1.12.1.nupkg C:\TEMP\asio.nupkg
ADD https://github.com/ros2/choco-packages/releases/download/2019-10-24/cunit.2.1.3.nupkg C:\TEMP\cunit.nupkg
ADD https://github.com/ros2/choco-packages/releases/download/2019-10-24/eigen.3.3.4.nupkg C:\TEMP\eigen.nupkg
ADD https://github.com/ros2/choco-packages/releases/download/2019-10-24/log4cxx.0.10.0.nupkg C:\TEMP\log4cxx.nupkg
ADD https://github.com/ros2/choco-packages/releases/download/2019-10-24/tinyxml-usestl.2.6.2.nupkg C:\TEMP\tinyxml.nupkg
ADD https://github.com/ros2/choco-packages/releases/download/2019-10-24/tinyxml2.6.0.0.nupkg C:\TEMP\tinyxml2.nupkg

# xmllint files
ADD https://www.zlatkovic.com/pub/libxml/64bit/libxml2-2.9.3-win32-x86_64.7z C:\TEMP\libxml2.7z
ADD https://www.zlatkovic.com/pub/libxml/64bit/zlib-1.2.8-win32-x86_64.7z C:\TEMP\zlib.7z
ADD https://www.zlatkovic.com/pub/libxml/64bit/iconv-1.14-win32-x86_64.7z C:\TEMP\iconv.7z

# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]

RUN C:\TEMP\python-37.exe /quiet `
TargetDir=C:\Python37 `
PrependPath=1 `
Include_debug=1 `
Include_symbols=1

# Install Chocolatey by powershell script
RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"

# choco installs
RUN choco install -y cmake curl git vcredist2013 vcredist140 cppcheck patch
RUN choco install -y -s C:\TEMP asio cunit eigen tinyxml-usestl tinyxml2 log4cxx

RUN C:\TEMP\Win64OpenSSL.exe /VERYSILENT

# For extracting .7z files
ADD https://www.7-zip.org/a/7z1900-x64.exe C:\TEMP\
RUN C:\TEMP\7z1900-x64.exe /S /D="C:\Program Files\7-zip"
RUN setx PATH "%PATH%;C:\Program Files\7-zip"

# Install xmllint
# 7z.exe command line usage https://sevenzip.osdn.jp/chm/cmdline/commands/extract.htm
RUN 7z.exe x C:\TEMP\libxml2.7z -aoa -oC:\xmllint
RUN 7z.exe x C:\TEMP\zlib.7z -aoa -oC:\xmllint
RUN 7z.exe x C:\TEMP\iconv.7z -aoa -oC:\xmllint
RUN 7z.exe x C:\TEMP\opencv.zip -aoa -oC:\

RUN 7z.exe x C:\TEMP\OpenSplice.zip -aoa -oC:\opensplice

# Environment setup
ENV OPENSSL_CONF C:\OpenSSL-Win64\bin\openssl.cfg
ENV OpenCV_DIR C:\opencv
ENV OSPL_HOME C:\opensplice\HDE\x86_64.win64
# You can't use ENV to append to the PATH https://stackoverflow.com/questions/42092932/appending-to-path-in-a-windows-docker-container
RUN setx PATH "%PATH%;C:\Program Files\Git\cmd;C:\Program Files\CMake\bin;C:\OpenSSL-Win64\bin\;C:\xmllint\bin;"C:\opencv\x64\vc16\bin"

RUN powershell -Command Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1
RUN mkdir C:\ws
WORKDIR C:\ci

# Invalidate once a day to cause online installers to check for updates
RUN echo %TODAYS_DATE%

# Qt5 online installer
ADD http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe C:\TEMP\

# Install Qt5 with automated install script, no msvc2019 version exists but 2017 is compatible
# Updater/silentUpdate options did not work for me. Install scripts finds and installs the most recent LTS version
COPY qt-installer.qs C:\TEMP\
RUN C:\TEMP\qt-unified-windows-x86-online.exe --script C:\TEMP\qt-installer.qs MsvcVersion=2019 ErrorLogname="%ERROR_FILENAME%"
RUN IF EXIST "%ERROR_FILENAME%" EXIT 1

RUN choco upgrade -y chocolatey
RUN choco upgrade -y all

# The rest of the python packages are installed through run_ros2_batch.py
RUN python -m pip install -U pip setuptools pydot PyQt5

COPY rticonnextdds-license\rti_license.dat C:\connext\
ENV RTI_LICENSE_FILE C:\connext\rti_license.dat

COPY rticonnextdds-src\openssl-1.0.2n-target-x64Win64VS2017.zip C:\TEMP\connext\
RUN 7z.exe x C:\TEMP\connext\openssl-1.0.2n-target-x64Win64VS2017.zip -aoa -oC:\connext\
ENV RTI_OPENSSL_BIN C:\connext\openssl-1.0.2n\x64Win64VS2017\release\bin
ENV RTI_OPENSSL_LIB C:\connext\openssl-1.0.2n\x64Win64VS2017\release\lib

COPY rticonnextdds-src\rti_connext_dds-5.3.1-pro-host-x64Win64.exe.??? C:\TEMP\connext\
RUN copy /b C:\TEMP\connext\rti_connext_dds-5.3.1-pro-host-x64Win64.exe.??? C:\TEMP\connext\rti_connext_dds-5.3.1-pro-host-x64Win64.exe
RUN C:\TEMP\connext\rti_connext_dds-5.3.1-pro-host-x64Win64.exe `
--mode unattended `
--unattendedmodeui minimalWithDialogs `
--prefix "%ProgramFiles%"

COPY rticonnextdds-src\openssl-1.0.2n-5.3.1-host-x64Win64.rtipkg C:\TEMP\connext\
RUN ""%ProgramFiles%\rti_connext_dds-5.3.1\bin\rtipkginstall.bat" C:\TEMP\connext\openssl-1.0.2n-5.3.1-host-x64Win64.rtipkg"
COPY rticonnextdds-src\rti_connext_dds-5.3.1-pro-target-x64Win64VS2017.rtipkg.??? C:\TEMP\connext\
RUN copy /b C:\TEMP\connext\rti_connext_dds-5.3.1-pro-target-x64Win64VS2017.rtipkg.??? C:\TEMP\connext\rti_connext_dds-5.3.1-pro-target-x64Win64VS2017.rtipkg
RUN ""%ProgramFiles%\rti_connext_dds-5.3.1\bin\rtipkginstall.bat" C:\TEMP\connext\rti_connext_dds-5.3.1-pro-target-x64Win64VS2017.rtipkg"
COPY rticonnextdds-src\rti_security_plugins-5.3.1-host-x64Win64.rtipkg C:\TEMP\connext\
RUN ""%ProgramFiles%\rti_connext_dds-5.3.1\bin\rtipkginstall.bat" C:\TEMP\connext\rti_security_plugins-5.3.1-host-x64Win64.rtipkg"
COPY rticonnextdds-src\rti_security_plugins-5.3.1-target-x64Win64VS2017.rtipkg C:\TEMP\connext\
RUN ""%ProgramFiles%\rti_connext_dds-5.3.1\bin\rtipkginstall.bat" C:\TEMP\connext\rti_security_plugins-5.3.1-target-x64Win64VS2017.rtipkg"

# Visual Studio Build Tools and .Net SDK`
ADD https://aka.ms/vs/16/release/vs_BuildTools.exe C:\TEMP\

# 3010 is an acceptable exit code (install was successful but restart required), but it will confuse docker.
# This installer invalidates docker image caches pretty regularly, so it's late in the order. See documentation for installer at:
# https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio?view=vs-2019
RUN C:\TEMP\vs_BuildTools.exe --quiet --wait --norestart --includeRecommended `
--add Microsoft.Net.Component.4.8.SDK `
--add Microsoft.VisualStudio.Workload.VCTools `
--add Microsoft.Component.MSBuild `
--add Microsoft.VisualStudio.Component.VC.CLI.Support `
|| IF "%ERRORLEVEL%"=="3010" EXIT 0

CMD ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Auxiliary\\Build\\vcvarsall.bat", "x86_amd64", "&&", `
"python", "run_ros2_batch.py", "%CI_ARGS%"]
Loading