From f3847491263225e81b9cdd293198081e9fff698a Mon Sep 17 00:00:00 2001 From: Stephen Brawner Date: Mon, 6 Apr 2020 18:36:35 -0700 Subject: [PATCH 01/15] Switching dockerfile to install from chef config. --- windows_docker_resources/Dockerfile | 4 +- windows_docker_resources/Dockerfile.foxy | 114 ++++------------------- windows_docker_resources/ros2-cookbooks | 2 +- 3 files changed, 23 insertions(+), 97 deletions(-) diff --git a/windows_docker_resources/Dockerfile b/windows_docker_resources/Dockerfile index d2ea8b8d4..7f37d5fa4 100644 --- a/windows_docker_resources/Dockerfile +++ b/windows_docker_resources/Dockerfile @@ -38,11 +38,11 @@ WORKDIR C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows RUN C:\opscode\chefdk\bin\berks vendor C:\TEMP\ros2-cookbooks\cookbooks # Initial run -RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json +RUN c:\cinc-project\cinc\bin\cinc-solo -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json # Invalidate daily to run updates RUN echo "@todays_date" -RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json +RUN c:\cinc-project\cinc\bin\cinc-solo -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json WORKDIR C:\ci CMD ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Auxiliary\\Build\\vcvarsall.bat", "x86_amd64", "&&", ` diff --git a/windows_docker_resources/Dockerfile.foxy b/windows_docker_resources/Dockerfile.foxy index 6d7ad5314..0ca87e367 100644 --- a/windows_docker_resources/Dockerfile.foxy +++ b/windows_docker_resources/Dockerfile.foxy @@ -58,102 +58,28 @@ RUN C:\TEMP\python-38.exe /quiet ` 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 patch -# Pin cppcheck until our builds are compatible with 2.0 https://github.com/ros2/ros2/issues/942 -RUN choco install -y cppcheck --version 1.90 -RUN choco pin add --name=cppcheck --version 1.90 -RUN choco install -y -s C:\TEMP asio cunit eigen tinyxml-usestl tinyxml2 log4cxx bullet - -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:\Program Files\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:\Program Files\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 +RUN choco install -y git chefdk -# Invalidate once a day to cause online installers to check for updates -RUN echo "@todays_date" +# Copy over necessary files into container +RUN mkdir C:\TEMP +# COPY rticonnextdds-license C:\TEMP\ +# COPY rticonnextdds-src C:\TEMP\ +COPY install_ros2.json C:\TEMP\ +COPY solo.rb C:\TEMP\ +COPY ros2-cookbooks\ C:\TEMP\ros2-cookbooks +COPY qtaccount\qtaccount.ini C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows\files\ + +# Download vendor cookbooks +WORKDIR C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows +RUN C:\opscode\chefdk\bin\berks vendor C:\TEMP\ros2-cookbooks\cookbooks -# 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\ - -# Installing Qt5 requires an account. This file contains a username and secret account token -RUN mkdir C:\Users\ContainerAdministrator\AppData\Roaming\Qt -COPY qtaccount\qtaccount.ini C:\Users\ContainerAdministrator\AppData\Roaming\Qt\qtaccount.ini - -RUN echo "If this docker build hangs longer than about 10-15 minutes at the following command, then Qt has likely updated the installer and requires updates to 'qt-installer.qs' or your Qt Account. To investigate the script, re-run the command with '--verbose'." -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_LIBS 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` -# If the most recent MSVS BuildTools causes new issues, previous releases of BuildTools can be found here: -# https://docs.microsoft.com/en-us/visualstudio/releases/2019/history -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 +# Initial run +RUN c:\cinc-project\cinc\bin\cinc-solo -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json +# Invalidate daily to run updates +RUN echo "@todays_date" +RUN c:\cinc-project\cinc\bin\cinc-solo -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json + +WORKDIR C:\ci CMD ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Auxiliary\\Build\\vcvarsall.bat", "x86_amd64", "&&", ` "python", "run_ros2_batch.py", "%CI_ARGS%"] diff --git a/windows_docker_resources/ros2-cookbooks b/windows_docker_resources/ros2-cookbooks index 76e4f3dba..723643e81 160000 --- a/windows_docker_resources/ros2-cookbooks +++ b/windows_docker_resources/ros2-cookbooks @@ -1 +1 @@ -Subproject commit 76e4f3dbabe36cac4aebd5ee6583e1845291a218 +Subproject commit 723643e81b927a2f49aaf35b3b2aa541f9900a12 From fed77f51db53eeb32f1578f188b07fcfbfb8e5af Mon Sep 17 00:00:00 2001 From: Stephen Brawner Date: Wed, 29 Apr 2020 17:00:16 -0700 Subject: [PATCH 02/15] Updating cookbooks. --- windows_docker_resources/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows_docker_resources/Dockerfile b/windows_docker_resources/Dockerfile index 7f37d5fa4..d2ea8b8d4 100644 --- a/windows_docker_resources/Dockerfile +++ b/windows_docker_resources/Dockerfile @@ -38,11 +38,11 @@ WORKDIR C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows RUN C:\opscode\chefdk\bin\berks vendor C:\TEMP\ros2-cookbooks\cookbooks # Initial run -RUN c:\cinc-project\cinc\bin\cinc-solo -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json +RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json # Invalidate daily to run updates RUN echo "@todays_date" -RUN c:\cinc-project\cinc\bin\cinc-solo -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json +RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json WORKDIR C:\ci CMD ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Auxiliary\\Build\\vcvarsall.bat", "x86_amd64", "&&", ` From 7eeed43c96bbc19aaf87c221a22bbfcf6f71d544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 24 Jun 2020 23:33:49 -0400 Subject: [PATCH 03/15] Add environment json file for setting chef attributes. --- windows_docker_resources/dashing.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 windows_docker_resources/dashing.json diff --git a/windows_docker_resources/dashing.json b/windows_docker_resources/dashing.json new file mode 100644 index 000000000..8e828442b --- /dev/null +++ b/windows_docker_resources/dashing.json @@ -0,0 +1,9 @@ +{ + "name": "dashing", + "default_attributes": { + "ros_distro": "dashing" + }, + "json_class": "Chef::Environment", + "description": "This in environment is used to enable Dashing compatible chef recipes", + "chef_type": "environment" +} From 9c28b5c85b099a6129be4634d7668a8fe8275230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 24 Jun 2020 23:34:34 -0400 Subject: [PATCH 04/15] Add docker build argument for ROS_DISTRO. Instead of using separate dockerfiles for different ROS distros this uses separate chef environment files to set a ros_distro attribute which can be used inside the chef cookbook. If this is successful we can unify the separate Dockerfiles and modify software in the chef cookbook. --- job_templates/ci_job.xml.em | 2 +- job_templates/packaging_job.xml.em | 2 +- windows_docker_resources/Dockerfile.dashing | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/job_templates/ci_job.xml.em b/job_templates/ci_job.xml.em index ab0ab27f2..5da82fd1d 100644 --- a/job_templates/ci_job.xml.em +++ b/job_templates/ci_job.xml.em @@ -378,7 +378,7 @@ powershell "(Get-Content ${Env:DOCKERFILE}).replace('@@todays_date', $(Get-Date) rem "Finding the Release Version is much easier with powershell than cmd" powershell $(Get-ItemProperty -Path 'HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed\Server.OS.amd64' -Name Version).Version > release_version.txt set /p RELEASE_VERSION=< release_version.txt -set BUILD_ARGS=--build-arg WINDOWS_RELEASE_VERSION=%RELEASE_VERSION% +set BUILD_ARGS=--build-arg WINDOWS_RELEASE_VERSION=%RELEASE_VERSION% --build-arg ROS_DISTRO=%CI_ROS_DISTRO% docker build %BUILD_ARGS% -t %CONTAINER_NAME% -f %DOCKERFILE% windows_docker_resources || exit /b !ERRORLEVEL! echo "# END SECTION" diff --git a/job_templates/packaging_job.xml.em b/job_templates/packaging_job.xml.em index 1e10a54d0..afec0b839 100644 --- a/job_templates/packaging_job.xml.em +++ b/job_templates/packaging_job.xml.em @@ -364,7 +364,7 @@ powershell "(Get-Content ${Env:DOCKERFILE}).replace('@@todays_date', $(Get-Date) rem "Finding the Release Version is much easier with powershell than cmd" powershell $(Get-ItemProperty -Path 'HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed\Server.OS.amd64' -Name Version).Version > release_version.txt set /p RELEASE_VERSION=< release_version.txt -set BUILD_ARGS=--build-arg WINDOWS_RELEASE_VERSION=%RELEASE_VERSION% +set BUILD_ARGS=--build-arg WINDOWS_RELEASE_VERSION=%RELEASE_VERSION% --build-arg ROS_DISTRO=%CI_ROS_DISTRO% docker build %BUILD_ARGS% -t %CONTAINER_NAME% -f %DOCKERFILE% windows_docker_resources || exit /b !ERRORLEVEL! echo "# END SECTION" diff --git a/windows_docker_resources/Dockerfile.dashing b/windows_docker_resources/Dockerfile.dashing index 0e1b509c3..34a6d79c6 100644 --- a/windows_docker_resources/Dockerfile.dashing +++ b/windows_docker_resources/Dockerfile.dashing @@ -34,7 +34,11 @@ COPY rticonnextdds-src\ C:\TEMP\rticonnextdds-src RUN copy /b C:\TEMP\rticonnextdds-src\rti_connext_dds-5.3.1-pro-host-x64Win64.exe.??? C:\TEMP\rticonnextdds-src\rti_connext_dds-5.3.1-pro-host-x64Win64.exe RUN copy /b C:\TEMP\rticonnextdds-src\rti_connext_dds-5.3.1-pro-target-x64Win64VS2017.rtipkg.??? C:\TEMP\rticonnextdds-src\rti_connext_dds-5.3.1-pro-target-x64Win64VS2017.rtipkg +# ROS_DISTRO argument should be set to install dependencies for the target ROS version. +ARG ROS_DISTRO + COPY install_ros2.json C:\TEMP\ +COPY %ROS_DISTRO%.json C:\TEMP\ COPY solo.rb C:\TEMP\ COPY ros2-cookbooks\ C:\TEMP\ros2-cookbooks COPY qtaccount\qtaccount.ini C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows\files\ @@ -44,7 +48,7 @@ WORKDIR C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows RUN C:\opscode\chefdk\bin\berks vendor C:\TEMP\ros2-cookbooks\cookbooks # Initial run -RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json +RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json -E C:\TEMP\%ROS_DISTRO%.json # Invalidate daily to run updates RUN echo "@todays_date" From c980d789559f9593fd8e3e2082b0552c9dacdb6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Thu, 25 Jun 2020 09:33:10 -0400 Subject: [PATCH 05/15] Use Docker variable syntax for build argument in COPY. --- windows_docker_resources/Dockerfile.dashing | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows_docker_resources/Dockerfile.dashing b/windows_docker_resources/Dockerfile.dashing index 34a6d79c6..916fc4d60 100644 --- a/windows_docker_resources/Dockerfile.dashing +++ b/windows_docker_resources/Dockerfile.dashing @@ -38,7 +38,7 @@ RUN copy /b C:\TEMP\rticonnextdds-src\rti_connext_dds-5.3.1-pro-target-x64Win64V ARG ROS_DISTRO COPY install_ros2.json C:\TEMP\ -COPY %ROS_DISTRO%.json C:\TEMP\ +COPY ${ROS_DISTRO}.json C:\TEMP\ COPY solo.rb C:\TEMP\ COPY ros2-cookbooks\ C:\TEMP\ros2-cookbooks COPY qtaccount\qtaccount.ini C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows\files\ From 9efa6b8be99cb313be6ec1822afca90ea039b818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Thu, 25 Jun 2020 09:47:25 -0400 Subject: [PATCH 06/15] Update chef environment usage. I forgot that environment paths must be configured instead of specifying an absolute path to an environment file. --- windows_docker_resources/Dockerfile.dashing | 4 ++-- windows_docker_resources/{ => environments}/dashing.json | 0 windows_docker_resources/solo.rb | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) rename windows_docker_resources/{ => environments}/dashing.json (100%) diff --git a/windows_docker_resources/Dockerfile.dashing b/windows_docker_resources/Dockerfile.dashing index 916fc4d60..82d11e6cd 100644 --- a/windows_docker_resources/Dockerfile.dashing +++ b/windows_docker_resources/Dockerfile.dashing @@ -38,7 +38,7 @@ RUN copy /b C:\TEMP\rticonnextdds-src\rti_connext_dds-5.3.1-pro-target-x64Win64V ARG ROS_DISTRO COPY install_ros2.json C:\TEMP\ -COPY ${ROS_DISTRO}.json C:\TEMP\ +COPY environments C:\TEMP\ COPY solo.rb C:\TEMP\ COPY ros2-cookbooks\ C:\TEMP\ros2-cookbooks COPY qtaccount\qtaccount.ini C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows\files\ @@ -48,7 +48,7 @@ WORKDIR C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows RUN C:\opscode\chefdk\bin\berks vendor C:\TEMP\ros2-cookbooks\cookbooks # Initial run -RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json -E C:\TEMP\%ROS_DISTRO%.json +RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json -E %ROS_DISTRO% # Invalidate daily to run updates RUN echo "@todays_date" diff --git a/windows_docker_resources/dashing.json b/windows_docker_resources/environments/dashing.json similarity index 100% rename from windows_docker_resources/dashing.json rename to windows_docker_resources/environments/dashing.json diff --git a/windows_docker_resources/solo.rb b/windows_docker_resources/solo.rb index db9a90575..8cd8b7a40 100644 --- a/windows_docker_resources/solo.rb +++ b/windows_docker_resources/solo.rb @@ -1,2 +1,3 @@ cookbook_path [File.join(File.expand_path("..", __FILE__), "ros2-cookbooks", "cookbooks")] +environment_path [File.join(File.expand_path("..", __FILE__), "environments")] solo true From fb78610007914d35c160411d51a423799f284aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Thu, 25 Jun 2020 10:18:52 -0400 Subject: [PATCH 07/15] Expand environment file and add README describing directory. --- windows_docker_resources/environments/README.md | 4 ++++ windows_docker_resources/environments/dashing.json | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 windows_docker_resources/environments/README.md diff --git a/windows_docker_resources/environments/README.md b/windows_docker_resources/environments/README.md new file mode 100644 index 000000000..47b152627 --- /dev/null +++ b/windows_docker_resources/environments/README.md @@ -0,0 +1,4 @@ +Directory containing chef environment files. + +Currently used to set attributes specific to different ROS distributions. +Currently just the ros_distro attribute. diff --git a/windows_docker_resources/environments/dashing.json b/windows_docker_resources/environments/dashing.json index 8e828442b..2126f2f70 100644 --- a/windows_docker_resources/environments/dashing.json +++ b/windows_docker_resources/environments/dashing.json @@ -1,9 +1,11 @@ { "name": "dashing", + "description": "This in environment is used to enable Dashing compatible chef recipes", + "chef_type": "environment", + "json_class": "Chef::Environment", "default_attributes": { "ros_distro": "dashing" }, - "json_class": "Chef::Environment", - "description": "This in environment is used to enable Dashing compatible chef recipes", - "chef_type": "environment" + "override_attributes": {}, + "cookbook_versions": {} } From 2d6b2dbf04b84ab88bb1ec940e5a192b153719ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Thu, 25 Jun 2020 10:23:28 -0400 Subject: [PATCH 08/15] Use a single string for environment_path. Unlike cookbook_path, environment_path must be a single string. --- windows_docker_resources/solo.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows_docker_resources/solo.rb b/windows_docker_resources/solo.rb index 8cd8b7a40..bb20ea8f3 100644 --- a/windows_docker_resources/solo.rb +++ b/windows_docker_resources/solo.rb @@ -1,3 +1,3 @@ cookbook_path [File.join(File.expand_path("..", __FILE__), "ros2-cookbooks", "cookbooks")] -environment_path [File.join(File.expand_path("..", __FILE__), "environments")] +environment_path File.join(File.expand_path("..", __FILE__), "environments") solo true From 1ba0ff871d2d7c1225557627e77d566fd25272c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 26 Jun 2020 13:50:48 -0400 Subject: [PATCH 09/15] Remove environment files. We're going to instead add the attribute directly to the install_ros2.json files. --- windows_docker_resources/Dockerfile.dashing | 3 +-- windows_docker_resources/environments/README.md | 4 ---- windows_docker_resources/environments/dashing.json | 11 ----------- 3 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 windows_docker_resources/environments/README.md delete mode 100644 windows_docker_resources/environments/dashing.json diff --git a/windows_docker_resources/Dockerfile.dashing b/windows_docker_resources/Dockerfile.dashing index 82d11e6cd..4bd3f83b6 100644 --- a/windows_docker_resources/Dockerfile.dashing +++ b/windows_docker_resources/Dockerfile.dashing @@ -37,8 +37,7 @@ RUN copy /b C:\TEMP\rticonnextdds-src\rti_connext_dds-5.3.1-pro-target-x64Win64V # ROS_DISTRO argument should be set to install dependencies for the target ROS version. ARG ROS_DISTRO -COPY install_ros2.json C:\TEMP\ -COPY environments C:\TEMP\ +COPY install_ros2_${ROS_DISTRO}.json C:\TEMP\ COPY solo.rb C:\TEMP\ COPY ros2-cookbooks\ C:\TEMP\ros2-cookbooks COPY qtaccount\qtaccount.ini C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows\files\ diff --git a/windows_docker_resources/environments/README.md b/windows_docker_resources/environments/README.md deleted file mode 100644 index 47b152627..000000000 --- a/windows_docker_resources/environments/README.md +++ /dev/null @@ -1,4 +0,0 @@ -Directory containing chef environment files. - -Currently used to set attributes specific to different ROS distributions. -Currently just the ros_distro attribute. diff --git a/windows_docker_resources/environments/dashing.json b/windows_docker_resources/environments/dashing.json deleted file mode 100644 index 2126f2f70..000000000 --- a/windows_docker_resources/environments/dashing.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "dashing", - "description": "This in environment is used to enable Dashing compatible chef recipes", - "chef_type": "environment", - "json_class": "Chef::Environment", - "default_attributes": { - "ros_distro": "dashing" - }, - "override_attributes": {}, - "cookbook_versions": {} -} From 1901a0d9825dcfc938c08443c0499c13e6f4dcf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 26 Jun 2020 13:52:14 -0400 Subject: [PATCH 10/15] Copy install_ros.json to Dashing specific file. --- .../install_ros2_dashing.json | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 windows_docker_resources/install_ros2_dashing.json diff --git a/windows_docker_resources/install_ros2_dashing.json b/windows_docker_resources/install_ros2_dashing.json new file mode 100644 index 000000000..4d77af536 --- /dev/null +++ b/windows_docker_resources/install_ros2_dashing.json @@ -0,0 +1,21 @@ +{ + "ros2_windows": { + "download_sources": "false", + "vs_version": "buildtools", + "ros2_ws": "C:/ci", + "rti_connext": { + "target_platform": "x64Win64", + "min_vs_version": "2017", + "license_file": "C:/TEMP/rticonnextdds-license/rti_license.dat", + "installer_dir": "C:/TEMP/rticonnextdds-src", + "version": "5.3.1", + "edition": "pro", + "openssl_version": "1.0.2n" + } + }, + "run_list": [ + "recipe[ros2_windows::ros2]", + "recipe[ros2_windows::opensplice]", + "recipe[ros2_windows::rti_connext]" + ] +} From 03725497606e8adaaa49daa658592d4370e4d4fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 26 Jun 2020 13:53:00 -0400 Subject: [PATCH 11/15] Add ros_distro attribute. --- windows_docker_resources/install_ros2_dashing.json | 1 + 1 file changed, 1 insertion(+) diff --git a/windows_docker_resources/install_ros2_dashing.json b/windows_docker_resources/install_ros2_dashing.json index 4d77af536..18b64c968 100644 --- a/windows_docker_resources/install_ros2_dashing.json +++ b/windows_docker_resources/install_ros2_dashing.json @@ -3,6 +3,7 @@ "download_sources": "false", "vs_version": "buildtools", "ros2_ws": "C:/ci", + "ros_distro": "dashing", "rti_connext": { "target_platform": "x64Win64", "min_vs_version": "2017", From bfa90aa2c60286e331d5c1a53d9c679fc8405dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 26 Jun 2020 16:00:43 -0400 Subject: [PATCH 12/15] Don't specify environment. --- windows_docker_resources/Dockerfile.dashing | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows_docker_resources/Dockerfile.dashing b/windows_docker_resources/Dockerfile.dashing index 4bd3f83b6..881948233 100644 --- a/windows_docker_resources/Dockerfile.dashing +++ b/windows_docker_resources/Dockerfile.dashing @@ -47,7 +47,7 @@ WORKDIR C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows RUN C:\opscode\chefdk\bin\berks vendor C:\TEMP\ros2-cookbooks\cookbooks # Initial run -RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json -E %ROS_DISTRO% +RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json # Invalidate daily to run updates RUN echo "@todays_date" From ce59fd4ad197550c78ecbab0c1a9d9f89ab1ac04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 26 Jun 2020 16:41:32 -0400 Subject: [PATCH 13/15] Use ros_distro-specific node file. --- windows_docker_resources/Dockerfile.dashing | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows_docker_resources/Dockerfile.dashing b/windows_docker_resources/Dockerfile.dashing index 881948233..c77acf856 100644 --- a/windows_docker_resources/Dockerfile.dashing +++ b/windows_docker_resources/Dockerfile.dashing @@ -47,11 +47,11 @@ WORKDIR C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows RUN C:\opscode\chefdk\bin\berks vendor C:\TEMP\ros2-cookbooks\cookbooks # Initial run -RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json +RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2_%ROS_DISTRO%.json # Invalidate daily to run updates RUN echo "@todays_date" -RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json +RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2_%ROS_DISTRO%.json WORKDIR C:\ci CMD ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Auxiliary\\Build\\vcvarsall.bat", "x86_amd64", "&&", ` From e3802bf7b1092d042a050983a5a77a2b45008f1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 1 Jul 2020 10:23:31 -0400 Subject: [PATCH 14/15] Re-organize dockerfiles and chef json files. --- windows_docker_resources/Dockerfile | 19 +++-- windows_docker_resources/Dockerfile.dashing | 58 ------------- windows_docker_resources/Dockerfile.foxy | 85 ------------------- .../install_ros2_eloquent.json | 22 +++++ ...stall_ros2.json => install_ros2_foxy.json} | 1 + .../install_ros2_rolling.json | 22 +++++ 6 files changed, 59 insertions(+), 148 deletions(-) delete mode 100644 windows_docker_resources/Dockerfile.dashing delete mode 100644 windows_docker_resources/Dockerfile.foxy create mode 100644 windows_docker_resources/install_ros2_eloquent.json rename windows_docker_resources/{install_ros2.json => install_ros2_foxy.json} (95%) create mode 100644 windows_docker_resources/install_ros2_rolling.json diff --git a/windows_docker_resources/Dockerfile b/windows_docker_resources/Dockerfile index d2ea8b8d4..c77acf856 100644 --- a/windows_docker_resources/Dockerfile +++ b/windows_docker_resources/Dockerfile @@ -6,11 +6,17 @@ # $(Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').ReleaseId ARG WINDOWS_RELEASE_ID=1909 +# In order to ensure the image is correctly compatible with the host system a +# more precise version than the release id is required. To find this value run +# the following in powershell. +# $(Get-ItemProperty -Path 'HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed\Server.OS.amd64' -Name Version).Version" +# Fall back to the Release ID +ARG WINDOWS_RELEASE_VERSION=$WINDOWS_RELEASE_ID + # 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 -FROM mcr.microsoft.com/windows@sha256:27f1a2a1f2f784f3716c2400d7e1bf93074a75e15f2974861c00275f93487c88 +FROM mcr.microsoft.com/windows:$WINDOWS_RELEASE_VERSION # Install cinc-solo, a compiled binary of chef-solo RUN powershell "iex ((New-Object System.Net.WebClient).DownloadString('https://omnitruck.cinc.sh/install.ps1')); install -version 15.10.12" @@ -28,7 +34,10 @@ COPY rticonnextdds-src\ C:\TEMP\rticonnextdds-src RUN copy /b C:\TEMP\rticonnextdds-src\rti_connext_dds-5.3.1-pro-host-x64Win64.exe.??? C:\TEMP\rticonnextdds-src\rti_connext_dds-5.3.1-pro-host-x64Win64.exe RUN copy /b C:\TEMP\rticonnextdds-src\rti_connext_dds-5.3.1-pro-target-x64Win64VS2017.rtipkg.??? C:\TEMP\rticonnextdds-src\rti_connext_dds-5.3.1-pro-target-x64Win64VS2017.rtipkg -COPY install_ros2.json C:\TEMP\ +# ROS_DISTRO argument should be set to install dependencies for the target ROS version. +ARG ROS_DISTRO + +COPY install_ros2_${ROS_DISTRO}.json C:\TEMP\ COPY solo.rb C:\TEMP\ COPY ros2-cookbooks\ C:\TEMP\ros2-cookbooks COPY qtaccount\qtaccount.ini C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows\files\ @@ -38,11 +47,11 @@ WORKDIR C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows RUN C:\opscode\chefdk\bin\berks vendor C:\TEMP\ros2-cookbooks\cookbooks # Initial run -RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json +RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2_%ROS_DISTRO%.json # Invalidate daily to run updates RUN echo "@todays_date" -RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json +RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2_%ROS_DISTRO%.json WORKDIR C:\ci CMD ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Auxiliary\\Build\\vcvarsall.bat", "x86_amd64", "&&", ` diff --git a/windows_docker_resources/Dockerfile.dashing b/windows_docker_resources/Dockerfile.dashing deleted file mode 100644 index c77acf856..000000000 --- a/windows_docker_resources/Dockerfile.dashing +++ /dev/null @@ -1,58 +0,0 @@ -# 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 - -# In order to ensure the image is correctly compatible with the host system a -# more precise version than the release id is required. To find this value run -# the following in powershell. -# $(Get-ItemProperty -Path 'HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed\Server.OS.amd64' -Name Version).Version" -# Fall back to the Release ID -ARG WINDOWS_RELEASE_VERSION=$WINDOWS_RELEASE_ID - -# 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_VERSION - -# Install cinc-solo, a compiled binary of chef-solo -RUN powershell "iex ((New-Object System.Net.WebClient).DownloadString('https://omnitruck.cinc.sh/install.ps1')); install -version 15.10.12" - -# 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 git chefdk - -# Copy over necessary files into container -RUN mkdir C:\TEMP -COPY rticonnextdds-license\ C:\TEMP\rticonnextdds-license -COPY rticonnextdds-src\ C:\TEMP\rticonnextdds-src -RUN copy /b C:\TEMP\rticonnextdds-src\rti_connext_dds-5.3.1-pro-host-x64Win64.exe.??? C:\TEMP\rticonnextdds-src\rti_connext_dds-5.3.1-pro-host-x64Win64.exe -RUN copy /b C:\TEMP\rticonnextdds-src\rti_connext_dds-5.3.1-pro-target-x64Win64VS2017.rtipkg.??? C:\TEMP\rticonnextdds-src\rti_connext_dds-5.3.1-pro-target-x64Win64VS2017.rtipkg - -# ROS_DISTRO argument should be set to install dependencies for the target ROS version. -ARG ROS_DISTRO - -COPY install_ros2_${ROS_DISTRO}.json C:\TEMP\ -COPY solo.rb C:\TEMP\ -COPY ros2-cookbooks\ C:\TEMP\ros2-cookbooks -COPY qtaccount\qtaccount.ini C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows\files\ - -# Download vendor cookbooks -WORKDIR C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows -RUN C:\opscode\chefdk\bin\berks vendor C:\TEMP\ros2-cookbooks\cookbooks - -# Initial run -RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2_%ROS_DISTRO%.json - -# Invalidate daily to run updates -RUN echo "@todays_date" -RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2_%ROS_DISTRO%.json - -WORKDIR C:\ci -CMD ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Auxiliary\\Build\\vcvarsall.bat", "x86_amd64", "&&", ` - "python", "run_ros2_batch.py", "%CI_ARGS%"] diff --git a/windows_docker_resources/Dockerfile.foxy b/windows_docker_resources/Dockerfile.foxy deleted file mode 100644 index 0ca87e367..000000000 --- a/windows_docker_resources/Dockerfile.foxy +++ /dev/null @@ -1,85 +0,0 @@ -# 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 - -# In order to ensure the image is correctly compatible with the host system a -# more precise version than the release id is required. To find this value run -# the following in powershell. -# $(Get-ItemProperty -Path 'HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed\Server.OS.amd64' -Name Version).Version" -# Fall back to the Release ID -ARG WINDOWS_RELEASE_VERSION=$WINDOWS_RELEASE_ID - -# 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_VERSION - -# 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_1_1g.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.8 -ADD https://www.python.org/ftp/python/3.8.3/python-3.8.3-amd64.exe C:\TEMP\python-38.exe - -# Custom choco packages -ADD https://github.com/ros2/choco-packages/releases/download/2020-02-24/asio.1.12.1.nupkg C:\TEMP\asio.nupkg -ADD https://github.com/ros2/choco-packages/releases/download/2020-02-24/bullet.2.89.0.nupkg C:\TEMP\bullet.nupkg -ADD https://github.com/ros2/choco-packages/releases/download/2020-02-24/cunit.2.1.3.nupkg C:\TEMP\cunit.nupkg -ADD https://github.com/ros2/choco-packages/releases/download/2020-02-24/eigen.3.3.4.nupkg C:\TEMP\eigen.nupkg -ADD https://github.com/ros2/choco-packages/releases/download/2020-02-24/log4cxx.0.10.0.nupkg C:\TEMP\log4cxx.nupkg -ADD https://github.com/ros2/choco-packages/releases/download/2020-02-24/tinyxml-usestl.2.6.2.nupkg C:\TEMP\tinyxml.nupkg -ADD https://github.com/ros2/choco-packages/releases/download/2020-02-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-38.exe /quiet ` - TargetDir=C:\Python38 ` - 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 git chefdk - -# Copy over necessary files into container -RUN mkdir C:\TEMP -# COPY rticonnextdds-license C:\TEMP\ -# COPY rticonnextdds-src C:\TEMP\ -COPY install_ros2.json C:\TEMP\ -COPY solo.rb C:\TEMP\ -COPY ros2-cookbooks\ C:\TEMP\ros2-cookbooks -COPY qtaccount\qtaccount.ini C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows\files\ - -# Download vendor cookbooks -WORKDIR C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows -RUN C:\opscode\chefdk\bin\berks vendor C:\TEMP\ros2-cookbooks\cookbooks - -# Initial run -RUN c:\cinc-project\cinc\bin\cinc-solo -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json - -# Invalidate daily to run updates -RUN echo "@todays_date" -RUN c:\cinc-project\cinc\bin\cinc-solo -c C:\TEMP\solo.rb -j C:\TEMP\install_ros2.json - -WORKDIR C:\ci -CMD ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Auxiliary\\Build\\vcvarsall.bat", "x86_amd64", "&&", ` - "python", "run_ros2_batch.py", "%CI_ARGS%"] diff --git a/windows_docker_resources/install_ros2_eloquent.json b/windows_docker_resources/install_ros2_eloquent.json new file mode 100644 index 000000000..cf0e8513d --- /dev/null +++ b/windows_docker_resources/install_ros2_eloquent.json @@ -0,0 +1,22 @@ +{ + "ros2_windows": { + "download_sources": "false", + "vs_version": "buildtools", + "ros2_ws": "C:/ci", + "ros_distro": "eloquent", + "rti_connext": { + "target_platform": "x64Win64", + "min_vs_version": "2017", + "license_file": "C:/TEMP/rticonnextdds-license/rti_license.dat", + "installer_dir": "C:/TEMP/rticonnextdds-src", + "version": "5.3.1", + "edition": "pro", + "openssl_version": "1.0.2n" + } + }, + "run_list": [ + "recipe[ros2_windows::ros2]", + "recipe[ros2_windows::opensplice]", + "recipe[ros2_windows::rti_connext]" + ] +} diff --git a/windows_docker_resources/install_ros2.json b/windows_docker_resources/install_ros2_foxy.json similarity index 95% rename from windows_docker_resources/install_ros2.json rename to windows_docker_resources/install_ros2_foxy.json index 4d77af536..ef85e5911 100644 --- a/windows_docker_resources/install_ros2.json +++ b/windows_docker_resources/install_ros2_foxy.json @@ -3,6 +3,7 @@ "download_sources": "false", "vs_version": "buildtools", "ros2_ws": "C:/ci", + "ros_distro": "foxy", "rti_connext": { "target_platform": "x64Win64", "min_vs_version": "2017", diff --git a/windows_docker_resources/install_ros2_rolling.json b/windows_docker_resources/install_ros2_rolling.json new file mode 100644 index 000000000..61d3eb9f9 --- /dev/null +++ b/windows_docker_resources/install_ros2_rolling.json @@ -0,0 +1,22 @@ +{ + "ros2_windows": { + "download_sources": "false", + "vs_version": "buildtools", + "ros2_ws": "C:/ci", + "ros_distro": "rolling", + "rti_connext": { + "target_platform": "x64Win64", + "min_vs_version": "2017", + "license_file": "C:/TEMP/rticonnextdds-license/rti_license.dat", + "installer_dir": "C:/TEMP/rticonnextdds-src", + "version": "5.3.1", + "edition": "pro", + "openssl_version": "1.0.2n" + } + }, + "run_list": [ + "recipe[ros2_windows::ros2]", + "recipe[ros2_windows::opensplice]", + "recipe[ros2_windows::rti_connext]" + ] +} From d68380c22107d902ec35a9927eac97e29d8e284a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 1 Jul 2020 10:25:45 -0400 Subject: [PATCH 15/15] Use ROS_DISTRO build arg instead of separate Dockerfiles. With the setup being performed by chef the Dockerfiles aren't distinct enough to warrant separate files and we can instead use a single dockerfile with different chef attributes. This also means we can stop fudging the ros_distro parameter since the common behavior is also implemented in Chef. --- job_templates/ci_job.xml.em | 10 +--------- job_templates/packaging_job.xml.em | 11 +---------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/job_templates/ci_job.xml.em b/job_templates/ci_job.xml.em index 5da82fd1d..bb890e3ea 100644 --- a/job_templates/ci_job.xml.em +++ b/job_templates/ci_job.xml.em @@ -361,16 +361,8 @@ setlocal enableDelayedExpansion rmdir /S /Q ws workspace "work space" echo "# BEGIN SECTION: Build DockerFile" -@# Rolling uses the Foxy Dockerfile. -if "!CI_ROS_DISTRO!" == "rolling" ( - set "CI_ROS_DISTRO=foxy" -) -@# Eloquent uses the Dashing Dockerfile. -if "!CI_ROS_DISTRO!" == "eloquent" ( - set "CI_ROS_DISTRO=dashing" -) set CONTAINER_NAME=ros2_windows_ci_%CI_ROS_DISTRO% -set DOCKERFILE=windows_docker_resources\Dockerfile.%CI_ROS_DISTRO% +set DOCKERFILE=windows_docker_resources\Dockerfile rem "Change dockerfile once per day to invalidate docker caches" powershell "(Get-Content ${Env:DOCKERFILE}).replace('@@todays_date', $(Get-Date).ToLongDateString()) | Set-Content ${Env:DOCKERFILE}" diff --git a/job_templates/packaging_job.xml.em b/job_templates/packaging_job.xml.em index afec0b839..45b57d59f 100644 --- a/job_templates/packaging_job.xml.em +++ b/job_templates/packaging_job.xml.em @@ -346,17 +346,8 @@ echo "# END SECTION" setlocal enableDelayedExpansion rmdir /S /Q ws workspace -echo "# BEGIN SECTION: Build DockerFile" -@# Rolling uses the Foxy Dockerfile. -if "!CI_ROS_DISTRO!" == "rolling" ( - set "CI_ROS_DISTRO=foxy" -) -@# Eloquent uses the Dashing Dockerfile. -if "!CI_ROS_DISTRO!" == "eloquent" ( - set "CI_ROS_DISTRO=dashing" -) set CONTAINER_NAME=ros2_windows_ci_%CI_ROS_DISTRO% -set DOCKERFILE=windows_docker_resources\Dockerfile.%CI_ROS_DISTRO%% +set DOCKERFILE=windows_docker_resources\Dockerfile rem "Change dockerfile once per day to invalidate docker caches" powershell "(Get-Content ${Env:DOCKERFILE}).replace('@@todays_date', $(Get-Date).ToLongDateString()) | Set-Content ${Env:DOCKERFILE}"