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

Use chocolatey package for upgrade #145

Merged

Conversation

zeusttu
Copy link

@zeusttu zeusttu commented Mar 2, 2020

Description

Switch to the chocolatey_package resource for upgrading an existing installation, because it seems to be more robust than Chocolatey's install script.

Added bonus: I also fixed the AppVeyor pipeline, which was failing because the Chef license was not being accepted.

Issues Resolved

#12, #144

Check List

  • All tests pass, except one which also fails on the master branch (the chocolatey.install_vars.chocolateyVersion attribute seems to be ignored when installing Chocolatey).
  • New functionality includes testing. -> There is no new functionality, but the re-implemented functionality does not have any tests. Since testing this functionality would require some multiple converge scenarios, it seems that writing tests for this would be pretty complicated to achieve, and beyond the effort I want to put into this PR. If anyone does feel like writing the tests, they are free to build upon my PR/branch.
  • New functionality has been documented in the README if applicable -> There is no new functionality.

Joost van der Hoff added 3 commits March 2, 2020 16:34
(even if the upgrade attribute is set to true)
Otherwise the pipeline fails on this command with the following error
message:

> Chef Development Kit cannot execute without accepting the license

It seems the command-line option to accept the licens can't be placed
such that it isn't erroneously interpreted as a subcommand (whether
before or after the exec subcommand), so I went with the environment
variable instead, which does seem to work correctly.
@zeusttu
Copy link
Author

zeusttu commented Mar 3, 2020

In case anyone is currently looking at this PR: I am going to squash the fixup commit into the preceding commit, so there will be a force push.

@zeusttu zeusttu force-pushed the use-chocolatey_package-for-upgrade branch from f558f55 to 2d171d9 Compare March 3, 2020 11:10
@ferventcoder ferventcoder requested a review from tas50 July 31, 2020 20:38
@tas50
Copy link
Contributor

tas50 commented Aug 12, 2020

I'd prefer to use a if/else statement so there's only 1 resource showing in the logs, but this will work. I can clean it up locally. Thanks for getting this going @zeusttu

@tas50 tas50 merged commit e062cc8 into chocolatey-community:master Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants