Project: Chef Infra (Provisioning / Automation & Configuration)
File: releasing_chef_infra.md

Has the version number been bumped for releasing? This can be done by merging in a PR that has the "Expeditor: Bump Version Minor" label applied. Are there any outstanding community PRs that should be merged? Ideally we don't make a community member wait multiple months for a code contribution to ship. Merge anything that's been reviewed. Are new resource "introduced" fields using the correct version? From time to time, we incorrectly merge a PR that has the wrong "introduced" version in a new resource or new resource property. If we added new resources or properties, make sure these fields match the version we are about to ship. Have any changes in Ohai been shipped to rubygems? NOTE: Keep in mind that if you are releasing a new version (chef 18 over chef 17, for example) you will need to ship updated\ versions of Ohai, Chef-Utils, Chef-Config and Knife to Rubygems.org BEFORE you ship Chef Do we have a build in the `current` channel? If not, you might wanna fix that. The docs team needs to know about our upcoming release at least 48 hours ahead of time. This ensures that when we release our docs are immediately available to users. Accommodations can be made for emergency releases. Contact the team directly in those instances. Do this for a normal release: Open 2 tickets on the Assign the first one to yourself to write documentation for your upcoming release. Create the second one, assign it to the `BL-DOCS team`, tag it as 'Documentation', and mark it as blocked by the first ticket you created. Inform the docs team either via `#docs-support` in Slack or directly and let them know about the ticket. Finish the documents following the steps below and update your tickets when you're done. The importance of our release notes cannot be understated. As developers, we understand changes between releases and we are accustomed to reading git history. Users are not, and if we don't call out new functionality, they will not find it on their own. We need to take the time and effort to write quality release notes that give a compelling reason to upgrade and also properly warn of any potential breaking changes. Make sure to involve the docs team so we can make sure our English is legible. `New features`: Document important / major new features. This is a great opportunity to show off our work and sell users on new workflows. `Compliance Phase Improvements`: We should always call out the updated Chef InSpec release and include a description of new functionality. If we've improved how compliance phase operates overall also call that out. `New Resources`: If we ship new resources, we want to make sure to brag about those

Use this section to give the elevator pitch for the new resource, including an example of how it might be used if available. `Updated Resources`: It's important to let users know about new functionality in resources they may already be using. Cover any important bug fixes or new properties/actions here. `Security Updates`: Call out any updated components we are shipping and include links to the CVEs if available. If there are any new or updated resources, the docs site will need to be updated. This is a `partially` automated process. If you are making a single resource update or changing wording, it may just be easier to do it by hand. `publish-release-notes.sh` pushes to S3 and then Netlify site needs to be rebuilt, so the Docs Site may not immediately reflect the Release notes related updates. The way to rebuild Netlify is manually or by merging a PR in chef-web-docs repository. Reach out to the Docs team to trigger an update. Run `rake docssite:resources` to generate content to a `docssite` directory WARNING: Any resource that inherits it's basic structure from a parent resource is likely to commingle settings from both when you run that command. For example, there are 17-20 resources that consume the basic package.rb resource file. As a consequence, ALL of the children will most likely have pulled in properties and actions that do not apply to them. You have to be careful here. Compare the relevant generated files to the content in the `content/resources` directory within the . The generated files are missing some content, such as action descriptions, and don't have perfect formatting, so this is a bit of an art form. This will take time - expect to use 2-4 days of going through the new docs to ensure you aren't accidentally overwriting things or ignoring important updates. One tool you can use to help yourself is Beyond Compare. If you have to buy it, it's like $20 You'll end up using a combo of the old docs, the new docs, what Beyond Compare shows you and your intuition. The docs are the most time-consuming aspect of the release. :warning: Be sure to update the appropriate version of Pending Release Notes in the ! Failure to do so will cause the `git commit` step in to fail. Chef employees can promote a build to stable from Slack. This is done with expeditor using a chatops command in the following format: `/expeditor promote chef/chef:main 17.1.9` or for a previous release branch: `/expeditor promote chef/chef:chef-16 16.13.9` :warning: Do not `gem push` the ruby gem manually... this will prevent promotion of habitat packages to stable and will block notifications to chef.io slack

:information_source: the promotion of habitat packages can also be blocked if the Linux and Linux2 packages somehow have the same timestamp. Also, make sure to announce the build on any social media platforms that you occupy if you feel comfortable doing so. It's great to make an announcement in `#sous-chefs` and `#general` in Community Slack, where we tend to get a good response. Many of our users consume Chef via Homebrew using our casks. Expeditor will create a pull request to update the Chef Homebrew cask, which will need to be merged here: https://github.com/chef/homebrew-chef Many Windows users consume our packages via Chocolatey. Here's how you get a new build out for them From a Windows host: Clone this repo locally : https://github.com/chef/chocolatey-packages There is no separate branch being maintained for each version of chef. Make your PR for `main` branch only. Getting the SHA256 checksum for windows artifact: There are three ways we can do this: Easiest: https://omnitruck.chef.io/current/chef/packages?v=18.4.2 - obviously replace the version then hit that url, scroll down to windows and get the SHA. Still Easy: Since we have already promoted latest version of chef, the artifacts will be available on download site. Visit https://www.chef.io/downloads/tools/infra-client?os=windows, select the intended Infra Client version and grab the SHA256 checksum for `Windows 2012r2` OS. In case this url changes or not accessible, use below method: Less Easy: Go to the buildkite release pipeline which you are promoting to stable. Go to the `windows-2012r2-x86_64` builder and download the artifact (NOTE: On a mac system, if the `msi` file gets downloaded as an `exe`, do this from a windows machine, since they are different files and not the intended file for which we are creating the chocolatey package.) Run `shasum -a 256 {pathtoyourdownloadedartifact}` This will output the SHA256 checksum for the file Update the version strings and sha checksums in the chef.nuspec and chocolateyinstall.ps1 files and create the PR. Contact the Build Systems team to get the password for the choco account if you don't have it already. The user is 'chef-ci'. Logon to the chocolatey and go to the account page Grab the API key from there. Run `choco pack .\chef\chef.nuspec` Note: If your nupkg file looks like this: `chef-client:15.1.9.nupkg` (note the colon), change the colon to a period. Choco push will fail on the colon Then run `choco push .\chef-client.15.1.9.nupkg --key APIKEYHERE`. You might get an error using just that command. This will solve that: `choco push .\chef-client.18.4.12.nupkg --api-key '<your key goes here>' --source=https://push.chocolatey.org/` Once the nupkg file is pushed to Chocolatey, then merge your PR (e.g PR ) Note: You may need to be added as a maintainer on . Please make sure cookstyle is working properly & auto correcting detected offenses for any of the cookbooks you are trying to test against the newer version of Chef Infra Client Reference doc - https://github.com/chef/cookstyle#usage You're done. You have a month to relax.