docs/dev/how_to/bumping_the_major_version.md
This document outlines the process for bumping the major version of Chef Infra Client for the yearly release.
Chef consumes Ohai from GitHub as both a runtime dependency and a testing dependency for Test Kitchen validations in Buildkite. Ohai's version is tightly coupled to that of Chef Infra Client so the first step in bumping the major release in the chef/chef repo is to bump the major version of Ohai.
Edit the Expeditor config for the new branch, which you'll create shortly:
Edit all the GitHub action workflows in .github/workflows/ to point to your new stable branch
On your local machine fork the current main branch to a new stable branch. For example: git checkout -b 16-stable.
Push the branch git push --set-upstream origin 16-stable
Starting from the main branch create a PR which:
VERSION file in the root of the repository to the new major releasechef-config and chef-utils dependencies to allow for the new major release of Chef Infra in ohai.gemspecPlease note these steps must be completed in sequence.
In .github/dependabot.yml add an entry for your new stable branch
Before bumping the major version of Chef Infra we want to fork off the current main to a new stable branch, which will be used to build hotfix releases. We support the N-1 version of Chef Infra Client for a year after the release of a new major version. For example Chef Infra Client 17 was released in April 2021, at which point Chef Infra Client 16 became the N-1 release. Chef Infra Client 16 will then be maintained with critical bug and security fixes until April 2022.
After defining the release branch in your .expeditor/config.yml and merging the pull request to main, you can now create the branch in git.
git checkout main
git pull
git branch *new_release_branch_name* # e.g. chef-18
git push origin *new_release_branch_name* # e.g. chef-18
Once you've forked to a new stable branch such as chef-17 you'll want to create a new branch so you can build a PR, which will get this branch ready for release:
main as well) pull_request:
push:
branches:
- chef-18
rake dependencies:update to generate a new gemfile.lockExample PR for Chef 15: https://github.com/chef/chef/pull/9236
Note: Make sure you're making this PR against the new stable branch and not main!
Create a PR that performs the following:
chef.gemspec and knife.gemspec to point to the new ohai major releaserake dependencies:updatechef-config and chef-utils deps in the Gemfile to point to the chef-XYZ stable branch in the chef/chef repo.