github.com/imran-kn/cilium-fork@v1.6.9/Documentation/contributing/release.rst (about) 1 .. only:: not (epub or latex or html) 2 3 WARNING: You are looking at unreleased Cilium documentation. 4 Please use the official rendered version released here: 5 http://docs.cilium.io 6 7 .. _release_management: 8 9 Release Management 10 ------------------ 11 12 This section describes the release cadence and all release related processes. 13 14 Release Cadence 15 ~~~~~~~~~~~~~~~ 16 17 Cilium schedules a minor release every 6 weeks. Each minor release is performed 18 by incrementing the ``Y`` in the version format ``X.Y.Z``. The group of 19 committers can decide to increment ``X`` instead to mark major milestones in 20 which case ``Y`` is reset to 0. 21 22 .. _stable_releases: 23 24 Stable releases 25 ~~~~~~~~~~~~~~~ 26 27 The committers can nominate PRs merged into master as required for backport 28 into the stable release branches. Upon necessity, stable releases are published 29 with the version ``X.Y.Z+1``. Stable releases are regularly released in high 30 frequency or on demand to address major incidents. 31 32 In order to guarantee stable production usage while maintaining a high release 33 cadence, the following stable releases will be maintained: 34 35 * Stable backports into the last two releases 36 * :ref:`lts` release for extended long term backport coverage 37 38 39 Backport criteria for X.Y.Z+n 40 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 41 42 Criteria for the inclusion into latest stable release branch, i.e. what goes 43 into ``v1.1.x`` before ``v1.2.0`` has been released: 44 45 - All bugfixes 46 47 Backport criteria for X.Y-1.Z 48 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 49 50 Criteria for the inclusion into the stable release branch of the previous 51 release, i.e. what goes into ``v1.0.x``, before ``v1.2.0`` has been released: 52 53 - Security relevant fixes 54 - Major bugfixes relevant to the correct operation of Cilium 55 56 .. _lts: 57 58 LTS 59 ~~~ 60 61 The group of committers nominates a release to be a long term stable release. 62 Such releases are guaranteed to receive backports for major and security 63 relevant bugfixes. LTS releases will be declared end of life after 6 months. 64 The group of committers will nominate and start supporting a new LTS release 65 before the current LTS expires. If for some reason, no release can be declared 66 LTS before the current LTS release expires, the current LTS lifetime will be 67 extended. 68 69 Given the current 6 weeks release cadence, the development teams will aim at 70 declaring every 3rd release to be an LTS to guarantee enough time overlap 71 between LTS release. 72 73 Current LTS releases 74 ^^^^^^^^^^^^^^^^^^^^ 75 76 +----------------------+---------------------------+-----------------------+ 77 | Release | Original Release Date | Scheduled End of Life | 78 +======================+===========================+=======================+ 79 | 1.0 | 2018-04-24 | 2018-10-24 | 80 +----------------------+---------------------------+-----------------------+ 81 82 .. _generic_release_process: 83 84 Generic Release Process 85 ~~~~~~~~~~~~~~~~~~~~~~~ 86 87 This process applies to all releases other than minor releases, this includes: 88 89 * Stable releases 90 * Release candidates 91 92 If you intent to release a new minor release, see the 93 :ref:`minor_release_process` section instead. 94 95 .. note:: The following commands have been validated when ran in the VM 96 used in the Cilium development process. See :ref:`dev_env` for 97 detailed instructions about setting up said VM. 98 99 #. Ensure that the necessary backports have been completed and merged. See 100 :ref:`backport_process`. 101 #. Checkout the desired stable branch and pull it: 102 103 :: 104 105 git checkout v1.0; git pull 106 107 #. Create a branch for the release pull request: 108 109 :: 110 111 git checkout -b pr/prepare-v1.0.3 112 113 #. Update the ``VERSION`` file to represent ``X.Y.Z+1`` 114 #. If this is the first release after creating a new release branch. Adjust the 115 image pull policy for all ``.sed`` files in ``install/kubernetes/cilium/values.yaml`` from 116 ``Always`` to ``IfNotPresent``. 117 #. Update the image tag versions in the examples: 118 119 :: 120 121 make -C install/kubernetes clean all 122 123 #. Update the ``cilium_version`` and ``cilium_tag`` variables in 124 ``examples/getting-started/Vagrantfile`` 125 126 #. Update the ``AUTHORS file`` 127 128 :: 129 130 make update-authors 131 132 133 .. note:: 134 135 Check to see if the ``AUTHORS`` file has any formatting errors (for 136 instance, indentation mismatches) as well as duplicate contributor 137 names, and correct them accordingly. 138 139 140 #. Generate the release notes by running the instructions provided in github.com/cilium/release 141 142 #. Add the generated release notes in the ``CHANGELOG.md`` file 143 144 #. Add all modified files using ``git add`` and create a pull request with the 145 title ``Prepare for release v1.0.3``. Add the backport label to the PR which 146 corresponds to the branch for which the release is being performed, e.g. 147 ``backport/1.0``. 148 149 .. note:: 150 151 Make sure to create the PR against the desired stable branch. In this 152 case ``v1.0`` 153 154 155 #. Follow standard procedures to get the aforementioned PR merged into the 156 desired stable branch. See :ref:`submit_pr` for more information about this 157 process. 158 159 #. Checkout out the stable branch and pull your merged changes: 160 161 :: 162 163 git checkout v1.0; git pull 164 165 #. Create release tags: 166 167 :: 168 169 git tag -a v1.0.3 -m 'Release v1.0.3' 170 git tag -a 1.0.3 -m 'Release 1.0.3' 171 172 .. note:: 173 174 There are two tags that correspond to the same release because GitHub 175 recommends using ``vx.y.z`` for release version formatting, and ReadTheDocs, 176 which hosts the Cilium documentation, requires the version to be in format 177 ``x.y.z`` For more information about how ReadTheDocs does versioning, you can 178 read their `Versions Documentation <https://docs.readthedocs.io/en/latest/versions.html>`_. 179 180 #. Build the binaries and push it to the release bucket: 181 182 :: 183 184 DOMAIN=releases.cilium.io ./contrib/release/uploadrev v1.0.3 185 186 187 This step will print a markdown snippet which you will need when crafting 188 the GitHub release so make sure to keep it handy. 189 190 .. note: 191 192 This step requires valid AWS credentials to be available via the 193 environment variables ``AWS_ACCESS_KEY_ID`` and 194 ``AWS_SECRET_ACCESS_KEY``. Ping in the ``#development`` channel on Slack 195 if you have no access. It also requires the aws-cli tools to be installed. 196 197 #. Build the container images and push them 198 199 :: 200 201 DOCKER_IMAGE_TAG=v1.0.3 make docker-image 202 docker push cilium/cilium:v1.0.3 203 204 .. note: 205 206 This step requires you to login with ``docker login`` first and it will 207 require your Docker hub ID to have access to the ``Cilium`` organization. 208 You can alternatively trigger a build on DockerHub directly if you have 209 credentials to do so. 210 211 #. Push the git release tag 212 213 :: 214 215 git push --tags 216 217 #. `Create a GitHub release <https://github.com/cilium/cilium/releases/new>`_: 218 219 #. Choose the correct target branch, e.g. ``v1.0`` 220 #. Choose the correct target tag, e.g. ``v1.0.3`` 221 #. Title: ``1.0.3`` 222 #. Check the ``This is a pre-release`` box if you are releasing a release 223 candidate. 224 #. Fill in the release description with the output generated by github.com/cilium/release 225 226 #. Announce the release in the ``#general`` channel on Slack 227 228 #. Bump the version of Cilium used in the Cilium upgrade tests to use the new release 229 230 Please reach out on the ``#development`` channel on Slack for assistance with 231 this task. 232 233 #. Update the external tools and guides to point to the released Cilium version: 234 235 * `kubeadm <https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/>`_ 236 * `kops <https://github.com/kubernetes/kops/>`_ 237 * `kubespray <https://github.com/kubernetes-sigs/kubespray/>`_ 238 239 .. _minor_release_process: 240 241 Minor Release Process 242 ~~~~~~~~~~~~~~~~~~~~~ 243 244 On Freeze date 245 ^^^^^^^^^^^^^^ 246 247 #. Fork a new release branch from master: 248 249 :: 250 251 git checkout master; git pull 252 git checkout -b v1.2 253 git push 254 255 #. Protect the branch using the GitHub UI to disallow direct push and require 256 merging via PRs with proper reviews. 257 258 #. Replace the contents of the ``CODEOWNERS`` file with the following to reduce 259 code reviews to essential approvals: 260 261 :: 262 263 * @cilium/janitors 264 api/ @cilium/api 265 pkg/apisocket/ @cilium/api 266 pkg/monitor/payload @cilium/api 267 pkg/policy/api/ @cilium/api 268 pkg/proxy/accesslog @cilium/api 269 270 #. Commit changes, open a pull request against the new ``v1.2`` branch, and get 271 the pull request merged 272 273 :: 274 275 git checkout -b pr/prepare-v1.2 276 git add [...] 277 git commit 278 git push 279 280 #. Follow the :ref:`generic_release_process` to release ``v1.2.0-rc1``. 281 282 #. Create the following GitHub labels: 283 284 #. ``backport-pending/1.2`` 285 #. ``backport-done/1.2`` 286 #. ``backport/1.2`` 287 #. ``needs-backport/1.2`` 288 289 #. Prepare the master branch for the next development cycle: 290 291 :: 292 293 git checkout master; git pull 294 295 #. Update the ``VERSION`` file to contain ``v1.2.90`` 296 #. Add the ``VERSION`` file using ``git add`` and create & merge a PR titled 297 ``Prepare for 1.3.0 development``. 298 #. Update the release branch on 299 `Jenkins <https://jenkins.cilium.io/job/cilium-ginkgo/job/cilium/>`_ to be 300 tested on every change and Nightly. 301 #. (Only 1.0 minor releases) Tag newest 1.0.x Docker image as ``v1.0-stable`` 302 and push it to Docker Hub. This will ensure that Kops uses latest 1.0 release by default. 303 304 305 306 For the final release 307 ^^^^^^^^^^^^^^^^^^^^^ 308 309 #. Follow the :ref:`generic_release_process` to create the final replace and replace 310 ``X.Y.0-rcX`` with ``X.Y.0``. 311 312 .. _backport_process: 313 314 Backporting process 315 ~~~~~~~~~~~~~~~~~~~ 316 317 Cilium PRs that are marked with the label ``needs-backport/X.Y`` need to be 318 backported to the stable branch ``X.Y``. The following steps summarize 319 the process for backporting these PRs. 320 321 1. Make sure the Github labels are up-to-date, as this process will 322 deal with all commits from PRs that have the ``needs-backport/X.Y`` label 323 set (for a stable release version X.Y). If any PRs contain labels such as 324 ``backport-pending/X.Y``, ensure that the backport for that PR have been 325 merged and if so, change the label to ``backport-done/X.Y``. 326 327 2. The scripts referred to below need to be run in Linux, they do not 328 work on OSX. You can use the cilium dev VM for this, but you need 329 to configure git to have your name and email address to be used in 330 the commit messages: 331 332 .. code-block:: bash 333 334 $ git config --global user.name "John Doe" 335 $ git config --global user.email johndoe@example.com 336 337 3. Make sure you have your a GitHub developer access token 338 available. For details, see `contrib/backporting/README.md 339 <https://github.com/cilium/cilium/blob/master/contrib/backporting/README.md>`_ 340 4. Fetch the repo, e.g., ``git fetch`` 341 5. Check a new branch for your backports based on the stable branch for that 342 version, e.g., ``git checkout -b pr/v1.0-backport-YY-MM-DD origin/v1.0`` 343 6. Run the ``check-stable`` script, referring to your Github access 344 token, this will list the commits that need backporting, from the 345 newest to oldest: 346 347 .. code-block:: bash 348 349 $ GITHUB_TOKEN=xxx contrib/backporting/check-stable 1.0 350 351 .. note:: 352 ``contrib/backporting/check-stable`` accepts a second argument to 353 specify a path to write a nicely-formatted pull request message to. 354 This can be used alongside 355 `Github command-line tools <https://github.com/node-gh/gh>`__ to 356 send the pull request from the command line in steps 9-10 via 357 ``gh pull-request -b vX.Y -l backport/vX.Y -F <path>``. 358 359 7. Cherry-pick the commits using the master git SHAs listed, starting 360 from the oldest (bottom), working your way up and fixing any merge 361 conflicts as they appear. Note that for PRs that have multiple 362 commits you will want to check that you are cherry-picking oldest 363 commits first. The ``cherry-pick`` script accepts multiple arguments, 364 in which case it will attempt to apply each commit in the order 365 specified on the command line until one cherry pick fails or every 366 commit is cherry-picked. 367 368 .. code-block:: bash 369 370 $ contrib/backporting/cherry-pick <oldest-commit-sha> 371 ... 372 $ contrib/backporting/cherry-pick <newest-commit-sha> 373 374 8. Push your backports branch to cilium repo, e.g., ``git push -u origin pr/v1.0-backports-YY-MM-DD`` 375 9. In Github, create a new PR from your branch towards the feature 376 branch you are backporting to. Note that by default Github creates 377 PRs against the master branch, so you will need to change it. 378 10. Label the new backport PR with the backport label for the stable branch 379 such as ``backport/X.Y`` so that it is easy to find backport PRs later. 380 11. Mark all PRs you backported with the backport pending label ``backport-pending/X.Y`` 381 and clear the ``needs-backport/vX.Y`` label. This can be via the GitHub 382 interface, or using the backport script ``contrib/backporting/set-labels.py``, e.g.: 383 384 .. code-block:: bash 385 386 # Set PR 1234's v1.0 backporting labels to pending 387 $ contrib/backporting/set-labels.py 1234 pending 1.0 388 389 .. note:: 390 391 ``contrib/backporting/set-labels.py`` requires Python 3 and 392 `PyGithub <https://pypi.org/project/PyGithub/>`_ installed. 393 394 12. After the backport PR is merged, mark all backported PRs with 395 ``backport-done/X.Y`` label and clear the ``backport-pending/X.Y`` label(s). 396 397 .. code-block:: bash 398 399 # Set PR 1234's v1.0 backporting labels to done 400 contrib/backporting/set-labels.py 1234 done 1.0.