You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Call Chocolatey Recipe
Set ['install_vars']['chocolateyVersion'] to 1.1.0 even though the repository contains a newer version such as 1.20
In my case, the following attributes were set:
default['chocolatey']['install_vars']['chocolateyVersion'] = '1.1.0'
default['chocolatey']['install_vars']['chocolateyDownloadUrl'] = "https://artifactory.infinitecampus.com/artifactory/chocolatey-production-virtual/choco/chocolatey.#{node['chocolatey']['install_vars']['chocolateyVersion']}.nupkg"
default['chocolatey']['install_vars']['chocolateyUseWindowsCompression'] = 'true'
default['chocolatey']['sensitive'] = true
default['chocolatey']['upgrade'] = true
Expected Result:
Version 1.1.0 will be installed and not upgraded
Actual Result:
Version 1.2.0 is installed and then it tries to upgrade to the version I specified (1.1.0) which fails
Install Details
I am using Chef to install Chocolatey for Business. We use Artifactory Enterprise Plus to host internalized packages and the Chocolatey package.
Also, the attribute ['install_vars']['chocolateyDownloadUrl'] has a default of https://chocolatey.org/api/v2/package/chocolatey. This is the community repository and not a direct link to specific nuget package in the repository. I am overriding this to point to our Artifactory repository. However, it is failing to find the package unless I give it the absolute URL with the versioned nuget path. I am wondering if there is a way to supply the path to the repository only and let the version I request automatically be found. I do not see an example of how to specify something like an Artifactory URL.
The text was updated successfully, but these errors were encountered:
Cookbook version
3.0.0
Chef-client version
14.15.6
Platform Details
Windows 2016 Server
Scenario:
Pin versions of Chocolatey executable (in this case 1.1.0) using the ['install_vars']['chocolateyVersion'] attribute. When doing so, it appears that it always installs the newest available version from the repository (https://github.com/chocolatey-community/chocolatey-cookbook/blob/master/recipes/default.rb#L36-L41)
Steps to Reproduce:
Call Chocolatey Recipe
Set ['install_vars']['chocolateyVersion'] to 1.1.0 even though the repository contains a newer version such as 1.20
In my case, the following attributes were set:
default['chocolatey']['install_vars']['chocolateyVersion'] = '1.1.0'
default['chocolatey']['install_vars']['chocolateyDownloadUrl'] = "https://artifactory.infinitecampus.com/artifactory/chocolatey-production-virtual/choco/chocolatey.#{node['chocolatey']['install_vars']['chocolateyVersion']}.nupkg"
default['chocolatey']['install_vars']['chocolateyUseWindowsCompression'] = 'true'
default['chocolatey']['sensitive'] = true
default['chocolatey']['upgrade'] = true
Expected Result:
Version 1.1.0 will be installed and not upgraded
Actual Result:
Version 1.2.0 is installed and then it tries to upgrade to the version I specified (1.1.0) which fails
Install Details
I am using Chef to install Chocolatey for Business. We use Artifactory Enterprise Plus to host internalized packages and the Chocolatey package.
It appears that the Supermarket cookbook installs the newest version only (1.2.0) and disregards the version specified in the attributes (['install_vars']['chocolateyVersion']) - chocolatey-cookbook/default.rb at master · chocolatey-community/chocolatey-cookbook (github.com).
Then on a second pass, it uses chocolatey_package :upgrade action to upgrade to the version I specified (1.1.0) which causes a failure. - chocolatey-cookbook/default.rb at master · chocolatey-community/chocolatey-cookbook (github.com)
Also, the attribute ['install_vars']['chocolateyDownloadUrl'] has a default of https://chocolatey.org/api/v2/package/chocolatey. This is the community repository and not a direct link to specific nuget package in the repository. I am overriding this to point to our Artifactory repository. However, it is failing to find the package unless I give it the absolute URL with the versioned nuget path. I am wondering if there is a way to supply the path to the repository only and let the version I request automatically be found. I do not see an example of how to specify something like an Artifactory URL.
The text was updated successfully, but these errors were encountered: