docs/dev/how_to/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 Chef-Infra board
1. Assign the first one to yourself to write documentation for your upcoming release.
2. 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.
3. Inform the docs team either via #docs-support in Slack or directly and let them know about the ticket.
4. Finish the documents following the steps below and update your tickets when you're done.
Release notes are published from the chef/chef-web-docs repository.
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 resources. 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 docs_site:resources to generate content to a docs_site directory
Compare the relevant generated files to the content in the content/resources directory within the chef-web-docs repo. 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.
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 wiki! Failure to do so will cause the git commit step in publish-release-notes.sh 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 channels.
: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:
Windows 2012r2 OS.
In case this url changes or not accessible, use below method: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.)shasum -a 256 {path_to_your_downloaded_artifact}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 API_KEY_HERE. 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 here)
Note: You may need to be added as a maintainer on Chocolatey.org.
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.