Validating the Chocolatey packages being uploaded to the internal repository was important to us, so we wrote some tests – one for the metadata and a different check run against the chocolateyinstall.ps1. $binaryfile = "\\\chocolatey\_REPLACE_" Writing Some Tests # Replace with full name of binary below (example.msi) $fileLocation = Join-Path $toolsDir '_REPLACE_' nuspec, we customized the standard chocolateyinstall.ps1 to include a section like this (we want to embed the binaries inside our Chocolatey packages, ensuring that when choco install is run on a remote client outside our firewall, they can still install the package): # To embed the binaries, place them in inside of the tools directory Our needs were very minimal, and the template we created reflected that. We started by creating the package template. The best method we found to automate this turned out to be Azure DevOps's excellent CI/CD feature set. nuspec and chocolateyinstall.ps1, and some custom code to copy binaries down from our file share for the final choco pack and choco push steps. To do this, we utilized Chocolatey package templates, custom tests for the. How-To Automating Chocolatey Package Development With Azure DevOpsĪs we began to roll out Chocolatey in our organization, we realized we needed to ensure consistency in the process of package creation and distribution to clients.
0 Comments
Leave a Reply. |