Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move CI to chocolatey 2 and Chef 18 #742

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
[submodule "windows_docker_resources/ros2-cookbooks"]
path = windows_docker_resources/ros2-cookbooks
url = [email protected]:ros-infrastructure/ros2-cookbooks
branch = latest
branch = claraberendsen/unpin-seven-zip
8 changes: 2 additions & 6 deletions windows_docker_resources/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ARG WINDOWS_RELEASE_VERSION=$WINDOWS_RELEASE_ID
FROM mcr.microsoft.com/windows/server:$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 16.15.22"
RUN powershell "iex ((New-Object System.Net.WebClient).DownloadString('https://omnitruck.cinc.sh/install.ps1')); install -version 18.3"
# Update certificate bundle to work Let's Encrypt root certificate expiration
# https://www.openssl.org/blog/blog/2021/09/13/LetsEncryptRootCertExpire/
# (in the parlance of the above post we're using workaround 1)
Expand All @@ -29,11 +29,7 @@ COPY cacert.pem c:\cinc-project\cinc\embedded\ssl\certs\cacert.pem
COPY cacert.pem c:\cinc-project\cinc\embedded\lib\ruby\gems\2.7.0\gems\httpclient-2.8.3\lib\httpclient\cacert.pem

# Install Chocolatey by powershell script

# Pining chocolatey version to 1.4.0 previous one to major bump to 2.0.0 due to issues with chocolatey_package chef resource
# See https://github.com/chef/chef/issues/13751 for more detail of the issue
# This should be solved for chef version 18; see https://github.com/chef/chef/pull/13833
RUN powershell -noexit "$env:chocolateyDownloadUrl = 'https://community.chocolatey.org/api/v2/package/chocolatey/1.4.0'; Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"
RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"

# choco installs. chef-workstation is being installed to get berks and download cookbook dependencies
RUN choco install -y git chef-workstation
Expand Down