1.. _release_process: 2 3Release Process 4############### 5 6The Zephyr project releases on a time-based cycle, rather than a feature-driven 7one. Zephyr releases represent an aggregation of the work of many contributors, 8companies, and individuals from the community. 9 10A time-based release process enables the Zephyr project to provide users with a 11balance of the latest technologies and features and excellent overall quality. A 12roughly 4-month release cycle allows the project to coordinate development of 13the features that have actually been implemented, allowing the project to 14maintain the quality of the overall release without delays because of one or two 15features that are not ready yet. 16 17The Zephyr release model was loosely based on the Linux kernel model: 18 19- Release tagging procedure: 20 21 - linear mode on main branch, 22 - release branches for maintenance after release tagging. 23- Each release period will consist of a development phase followed by a 24 stabilization phase. Release candidates will be tagged during the 25 stabilization phase. During the stabilization phase, only stabilization 26 changes such as bug fixes and documentation will be merged unless granted a 27 special exemption by the Technical Steering Committee. 28 29 - Development phase: all changes are considered and merged, subject to 30 approval from the respective maintainers. 31 - Stabilisation phase: the release manager creates a vN-rc1 tag and the tree 32 enters the stabilization phase 33 - CI sees the tag, builds and runs tests; Test teams analyse the report from the 34 build and test run and give an ACK/NAK to the build 35 - The release owner, with test teams and any other needed input, determines if the 36 release candidate is a go for release 37 - If it is a go for a release, the release owner lays a tag release vN at the 38 same point 39 40.. figure:: release_cycle.svg 41 :align: center 42 :alt: Release Cycle 43 :figclass: align-center 44 :width: 80% 45 46 Release Cycle 47 48.. note:: 49 50 The milestones for the current major version can be found on the 51 `Official GitHub Wiki <https://github.com/zephyrproject-rtos/zephyr/wiki/Release-Management>`_. 52 Information on previous releases can be found :ref:`here <zephyr_release_notes>`. 53 54Development Phase 55***************** 56 57A relatively straightforward discipline is followed with regard to the merging 58of patches for each release. At the beginning of each development cycle, the 59main branch is said to be open for development. At that time, code which is deemed to be 60sufficiently stable (and which is accepted by the maintainers and the wide community) is 61merged into the mainline tree. The bulk of changes for a new development cycle 62(and all of the major changes) will be merged during this time. 63 64The development phase lasts for approximately three months. At the end of this time, 65the release owner will declare that the development phase is over and releases the first 66of the release candidates. For the codebase release which is destined to be 673.1.0, for example, the release which happens at the end of the development phase 68will be called 3.1.0-rc1. The -rc1 release is the signal that the time to merge 69new features has passed, and that the time to stabilize the next release of the 70code base has begun. 71 72Stabilization Phase 73******************* 74 75Over the next weeks and depending on the release milestone, only stabilization, 76cosmetic changes, tests, bug and doc fixes are allowed (See :ref:`table 77<release_milestones>` below). 78 79On occasion, more significant changes and new features will be allowed, but such 80occasions are rare and require a TSC approval and a justification. As a general 81rule, if you miss submitting your code during the development phase for a given 82feature, the best thing to do is to wait for the next development cycle. (An 83occasional exception is made for drivers for previously unsupported hardware; if 84they do not touch any other in-tree code, they cannot cause regressions and 85should be safe to add at any time). 86 87As fixes make their way into the mainline, the patch rate will slow over time. 88The mainline release owner releases new -rc drops once or twice a week; a normal 89series will get up to somewhere between -rc4 and -rc6 before the code base is 90considered to be sufficiently stable and the release criteria have been achieved 91at which point the final 3.1.0 release is made. 92 93At that point, the whole process starts over again. 94 95.. _release_quality_criteria: 96 97Release Criteria 98**************** 99 100The main motivation is to clearly have the criteria in place that must be met 101for a release. This will help define when a release is "done" in terms that most 102people can understand and in ways that help new people to understand the process 103and participate in creating successful releases: 104 105- The release criteria documents all the requirements of our target audience for 106 each Zephyr release 107- The target audiences for each release can be different, and may overlap 108- The criteria at any given time are not set in stone: there may be requirements 109 that have been overlooked, or that are new, and in these cases, the criteria 110 should be expanded to ensure all needs are covered. 111 112Below is the high level criteria to be met for each release: 113 114- No blocker bugs / blocking issues 115- All relevant tests shall pass on ``Tier 0`` platforms 116- All relevant tests shall pass on Tier 0 and 1 platforms (at least 1 per 117 architecture/architecture variant/Hardware features) 118- All applicable samples/tests shall build on Tiers 0, 1 and 2 119- All high and critical static analysis and security issues addressed 120- Release Notes are up-to-date. 121 122Blocker Bugs 123============ 124 125Blocker bug process kicks in during the release process and is in effect after the 126feature freeze milestone. An issue labeled as a blocker practically blocks a 127release from happening. All blocker bugs shall be resolved before a release is 128created. 129 130A fix for a bug that is granted ``blocker`` status can be merged to 'main' and included in 131the release all the way until the final release date. 132 133Bugs of moderate severity and higher that have impact on all users are typically 134the candidates to be promoted to blocker bugs 135 136Contributors and member of the release engineering team shall follow these 137guidelines for release blocker bugs: 138 139- Only mark bugs as blockers if the software (Zephyr) must not be released with 140 the bug present. 141- All collaborators can add or remove blocking labels. 142- Evaluate bugs as potential blockers based on their severity and prevalence. 143- Provide detailed rationale whenever adding or removing a blocking label. 144- Ensure all blockers have the milestone tagged. 145- Release managers have final say on blocking status; contact them with any questions. 146 147 148.. _release_milestones: 149 150Release Milestones 151******************* 152 153 154.. list-table:: Release Milestones 155 :widths: 15 25 100 25 156 :header-rows: 1 157 158 * - Timeline 159 - Checkpoint 160 - Description 161 - Owner 162 * - T-5M 163 - Planning 164 - Finalize dates for release, Assign release owner and agree on project wide goals for this release. 165 - TSC 166 * - T-7W 167 - Review target milestones 168 - Finalize target milestones for features in flight. 169 - Release Engineering 170 * - T-4W 171 - Release Announcement 172 - Release owner announces feature freeze and timeline for release. 173 - Release Manager 174 * - T-3W 175 - Feature Freeze (RC1) 176 - No new features after RC1, ONLY stabilization and cosmetic changes, bug and doc 177 fixes are allowed. New tests for existing features are also allowed. 178 - Release Engineering 179 * - T-2W 180 - 2nd Release Candidate 181 - No new features after RC2, ONLY stabilization and cosmetic changes, bug and doc fixes are allowed. 182 - Release Manager 183 * - T-1W 184 - Hard Freeze (RC3) 185 - Only blocker bug fixes after RC3, documentation and changes to release notes are allowed. 186 Release notes need to be complete by this checkpoint. Release Criteria is 187 met. 188 - Release Manager 189 * - T-0W 190 - Release 191 - 192 - Release Manager 193 194 195Releases 196********* 197 198The following syntax should be used for releases and tags in Git: 199 200- Release [Major].[Minor].[Patch Level] 201- Release Candidate [Major].[Minor].[Patch Level]-rc[RC Number] 202- Tagging: 203 204 - v[Major].[Minor].[Patch Level]-rc[RC Number] 205 - v[Major].[Minor].[Patch Level] 206 - v[Major].[Minor].99 - A tag applied to main branch to signify that work on 207 v[Major].[Minor+1] has started. For example, v1.7.99 will be tagged at the 208 start of v1.8 process. The tag corresponds to 209 VERSION_MAJOR/VERSION_MINOR/PATCHLEVEL macros as defined for a 210 work-in-progress main branch version. Presence of this tag allows generation of 211 sensible output for "git describe" on main branch, as typically used for 212 automated builds and CI tools. 213 214 215.. figure:: release_flow.png 216 :align: center 217 :alt: Releases 218 :figclass: align-center 219 :width: 80% 220 221 Zephyr Code and Releases 222 223.. _release_process_lts: 224 225Long Term Support (LTS) 226======================= 227 228Long-term support releases are designed to be supported and maintained 229for an extended period and is the recommended release for 230products and the auditable branch used for certification. 231 232An LTS release is defined as: 233 234- **Product focused** 235- **Extended Stabilisation period**: Allow for more testing and bug fixing 236- **Stable APIs** 237- **Quality Driven Process** 238- **Long Term**: Maintained for an extended period of time (at least 2.5 years) 239 overlapping previous LTS release for at least half a year. 240 241 242Product Focused 243+++++++++++++++ 244 245Zephyr LTS is the recommended release for product makers with an extended 246support and maintenance which includes general stability and bug fixes, 247security fixes. 248 249An LTS includes both mature and new features. API and feature maturity is 250documented and tracked. The footprint and scope of mature and stable APIs expands 251as we move from one LTS to the next giving users access to bleeding edge features 252and new hardware while keeping a stable foundation that evolves over time. 253 254Extended Stabilisation Period 255+++++++++++++++++++++++++++++ 256 257Zephyr LTS development cycle differs from regular releases and has an extended 258stabilization period. Feature freeze of regular releases happens 3-4 weeks 259before the scheduled release date. The stabilization period for LTS is extended 260by 3 weeks with the feature freeze occurring 6-7 weeks before the anticipated 261release date. The time between code freeze and release date is extended in this case. 262 263Stable APIs 264+++++++++++ 265 266Zephyr LTS provides a stable and long-lived foundation for developing 267products. To guarantee stability of the APIs and the implementation of such 268APIs it is required that any release software that makes the core of the OS 269went through the Zephyr API lifecycle and stabilized over at least 2 releases. 270This guarantees that we release many of the highlighted and core features with 271mature and well-established implementations with stable APIs that are 272supported during the lifetime of the release LTS. 273 274- API Freeze (LTS - 2) 275 276 - All stable APIs need to be frozen 2 releases before an LTS. APIs can be extended 277 with additional features, but the core implementation is not modified. This 278 is valid for the following subsystems for example: 279 280 - Device Drivers (i2c.h, spi.h)... 281 - Kernel (k_*): 282 - OS services (logging,debugging, ..) 283 - DTS: API and bindings stability 284 - Kconfig 285 286 - New APIs for experimental features can be added at any time as long as they 287 are standalone and documented as experimental or unstable features/APIs. 288- Feature Freeze (LTS - 1) 289 - No new features or overhaul/restructuring of code covering major LTS features. 290 291 - Kernel + Base OS 292 - Additional advertised LTS features 293 294 - Auxiliary features on top of and/or extending the base OS and advertised LTS features 295 can be added at any time and should be marked as experimental if applicable 296 297Quality Driven Process 298++++++++++++++++++++++ 299 300The Zephyr project follows industry standards and processes with the goal of 301providing a quality oriented releases. This is achieved by providing the 302following products to track progress, integrity and quality of the software 303components provided by the project: 304 305- Compliance with published coding guidelines, style guides and naming 306 conventions and documentation of deviations. 307- Static analysis reports 308 309 - Regular static analysis on the complete tree using available commercial and 310 open-source tools, and documentation of deviations and false positives. 311 312- Documented components and APIS 313- Requirements Catalog 314- Verification Plans 315- Verification Reports 316- Coverage Reports 317- Requirements Traceability Matrix (RTM) 318- SPDX License Reports 319 320Each release is created with the above products to document the quality and the 321state of the software when it was released. 322 323Long Term Support and Maintenance 324++++++++++++++++++++++++++++++++++ 325 326A Zephyr LTS release is published every 2 years and is branched and maintained 327independently from the main tree for at least 2.5 years after it was 328released. Support and maintenance for an LTS release stops at least half a year 329after the following LTS release is published. 330 331.. figure:: lts.svg 332 :align: center 333 :alt: Long Term Support Release 334 :figclass: align-center 335 :width: 80% 336 337 Long Term Support Release 338 339Changes and fixes flow in both directions. However, changes from main branch to an 340LTS branch will be limited to fixes that apply to both branches and for existing 341features only. 342 343All fixes for an LTS branch that apply to the mainline tree shall be submitted to 344mainline tree as well. 345 346Auditable Code Base 347=================== 348 349An auditable code base is to be established from a defined subset of Zephyr OS 350features and will be limited in scope. The LTS, development tree, and the 351auditable code bases shall be kept in sync after the audit branch is created, 352but with a more rigorous process in place for adding new features into the audit 353branch used for certification. 354 355This process will be applied before new features move into the 356auditable code base. 357 358The initial and subsequent certification targets will be decided by the Zephyr project 359governing board. 360 361Processes to achieve selected certification will be determined by the Security and 362Safety Working Groups and coordinated with the TSC. 363 364 365Hardware Support Tiers 366*********************** 367 368Tier 0: Emulation Platforms 369=========================== 370 371- Tests are both built and run in these platforms in CI, and therefore runtime 372 failures can block Pull Requests. 373- Supported by the Zephyr project itself, commitment to fix bugs in releases. 374- One Tier 0 platform is required for each new architecture. 375- Bugs reported against platforms of this tier are to be evaluated and treated as 376 a general bug in Zephyr and should be dealt with the highest priority. 377 378Tier 1: Supported Platforms 379=========================== 380 381- Commitment from a specific team to run tests using twister device 382 testing for the "Zephyr compatibility test suite" (details TBD) 383 on a regular basis using open-source and publicly available drivers. 384- Commitment to fix bugs in time for releases. Not supported by "Zephyr Project" 385 itself. 386- General availability for purchase 387- Bugs reported against platforms of this tier are to be evaluated and treated 388 as a general bug in Zephyr and should be dealt with medium to high priority. 389 390Tier 2: Community Platforms 391=========================== 392 393- Platform implementation is available in upstream, no commitment to testing, 394 may not be generally available. 395- Has a dedicated maintainer who commits to respond to issues / review patches. 396- Bugs reported against platforms of this tier are NOT considered as 397 a general bug in Zephyr. 398 399Tier 3: Deprecated and unsupported Platforms 400============================================ 401 402- Platform implementation is available, but no owner or unresponsive owner. 403- No commitment to support is available. 404- May be removed from upstream if no one works to bring it up to tier 2 or better. 405- Bugs reported against platforms of this tier are NOT considered as 406 a general bug in Zephyr. 407 408 409Release Procedure 410****************** 411 412This section documents the Release manager responsibilities so that it serves as 413a knowledge repository for Release managers. 414 415Release Checklist 416================= 417 418Each release has a GitHub issue associated with it that contains the full 419checklist. After a release is complete, a checklist for the next release is 420created. 421 422Tagging 423======= 424 425The final release and each release candidate shall be tagged using the following 426steps: 427 428.. note:: 429 430 Tagging needs to be done via explicit git commands and not via GitHub's release 431 interface. The GitHub release interface does not generate annotated tags (it 432 generates 'lightweight' tags regardless of release or pre-release). You should 433 also upload your gpg public key to your GitHub account, since the instructions 434 below involve creating signed tags. However, if you do not have a gpg public 435 key you can opt to remove the ``-s`` option from the commands below. 436 437.. tabs:: 438 439 .. tab:: Release Candidate 440 441 .. note:: 442 443 This section uses tagging 1.11.0-rc1 as an example, replace with 444 the appropriate release candidate version. 445 446 #. Update the version variables in the :zephyr_file:`VERSION` file 447 located in the root of the Git repository to match the version for 448 this release candidate. The ``EXTRAVERSION`` variable is used to 449 identify the rc[RC Number] value for this candidate:: 450 451 EXTRAVERSION = rc1 452 453 #. Post a PR with the updated :zephyr_file:`VERSION` file using 454 ``release: Zephyr 1.11.0-rc1`` as the commit subject. Merge 455 the PR after successful CI. 456 457 #. Tag and push the version, using an annotated tag:: 458 459 $ git pull 460 $ git tag -s -m "Zephyr 1.11.0-rc1" v1.11.0-rc1 461 462 #. Verify that the tag has been signed correctly, ``git show`` for the 463 tag must contain a signature (look for the ``BEGIN PGP SIGNATURE`` 464 or ``BEGIN SSH SIGNATURE`` marker in the output):: 465 466 $ git show v1.11.0-rc1 467 468 #. Push the tag:: 469 470 $ git push git@github.com:zephyrproject-rtos/zephyr.git v1.11.0-rc1 471 472 #. Send an email to the mailing lists (``announce`` and ``devel``) 473 with a link to the release 474 475 .. tab:: Final Release 476 477 .. note:: 478 479 This section uses tagging 1.11.0 as an example, replace with the 480 appropriate final release version. 481 482 When all final release criteria has been met and the final release notes 483 have been approved and merged into the repository, the final release version 484 will be set and repository tagged using the following procedure: 485 486 #. Update the version variables in the :zephyr_file:`VERSION` file 487 located in the root of the Git repository. Set ``EXTRAVERSION`` 488 variable to an empty string to indicate final release:: 489 490 EXTRAVERSION = 491 492 #. Post a PR with the updated :zephyr_file:`VERSION` file using 493 ``release: Zephyr 1.11.0`` as the commit subject. Merge 494 the PR after successful CI. 495 #. Tag and push the version, using two annotated tags:: 496 497 $ git pull 498 $ git tag -s -m "Zephyr 1.11.0" v1.11.0 499 500 #. Verify that the tag has been signed correctly, ``git show`` for the 501 tag must contain a signature (look for the ``BEGIN PGP SIGNATURE`` 502 or ``BEGIN SSH SIGNATURE`` marker in the output):: 503 504 $ git show v1.11.0 505 506 #. Push the tag:: 507 508 $ git push git@github.com:zephyrproject-rtos/zephyr.git v1.11.0 509 510 #. Find the new ``v1.11.0`` tag at the top of the releases page and 511 edit the release with the ``Edit tag`` button with the following: 512 513 * Copy the overview of ``docs/releases/release-notes-1.11.rst`` 514 into the release notes textbox and link to the full release notes 515 file on docs.zephyrproject.org. 516 517 #. Send an email to the mailing lists (``announce`` and ``devel``) with a link 518 to the release 519