ros2 / ci

ROS 2 CI Infrastructure
http://ci.ros2.org/
Apache License 2.0
48 stars 30 forks source link

Pin chocolatey version to 1.4.0 #720

Closed claraberendsen closed 1 year ago

claraberendsen commented 1 year ago

Description

There is a drift in the way chocolatey manages installs between 1.x and 2.x that has not been reconciled yet on chef for their chocolatey_package resource. See issue https://github.com/chef/chef/issues/13751. To fix the windows builds the chocolatey version is pinned to the latest one from the 1.x version, until this drift is resolved and our setup can be bumped to chef 18.

Testing

Error due to mismatch

Reference build : https://ci.ros2.org/view/nightly/job/nightly_win_rel/2739/console

[2023-07-13T04:39:05+00:00] FATAL: Chef::Exceptions::Package: chocolatey_package[curl] (ros2_windows::chocolatey_installs line 2) had an error: Chef::Exceptions::Package: No candidate version available for curl

With fix

Reference build: https://ci.ros2.org/job/test_ci_windows/324/console

18:53:00 Step 7/28 : 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'))"
18:53:00  ---> Running in 69c213da4b61
18:53:06 Forcing web requests to allow TLS v1.2 (Required for requests to Chocolatey.org)
18:53:06 Downloading Chocolatey from: https://community.chocolatey.org/api/v2/package/chocolatey/1.4.0

....

19:14:59   * chocolatey_package[curl] action install
19:15:10     - install version 8.1.2 of package curl