blob: 1f88dc1d1fb47b3f5ea1d9b4cdb8f3ad9d7661f9 [file] [log] [blame]
ajayb3f40982021-12-08 14:26:11 -08001..
2 SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
3 SPDX-License-Identifier: Apache-2.0
4
Zack Williamsccaa38a2021-11-16 15:36:05 -07005Release Process
6===============
7
8Prerequisites
9-------------
10
11SD-Core makes the following assumptions about the components are included in a
12release:
13
14Git tags
15""""""""
16
17Code receives Git tags as a part of the CI process
18
19* Tag content comes from a **VERSION** file within the repo, and tags are
20 created only the version is a SemVer released version (example: ``1.2.3``, no
21 ``-dev`` or ``-rc`` extensions)
22
23* Tagging is *only done by the CI system* (Jenkins), which pushes tags to git
24 repos after a submit/merge of code which changes the **VERSION** file.
25
26* CI system enforces tag uniqueness - no two commits have the same released
27 version tags.
28
29 * You can't re-release or "fix" a version that has problem - make a new
30 version with fixes in it.
31
32Docker container images
33"""""""""""""""""""""""
34
35All docker images are tagged based on their git tags.
36
37* For released versions, the CI system should prevent a Dockerfile from
38 referencing a parent containers that are a moving target, such as ``latest``
39 or ``master``.
40
41 * This allows a container to be rebuilt given an arbitrary git commit with
42 fair confidence that it will result in the same code in the container.
43
44* Official images are only pushed to registries by the CI system
45
46 * Increases repeatability of the process, and prevents human accidents.
47
48Helm charts
49"""""""""""
50
51* Each chart may only contain references to released, SemVer tagged container images
52
53 * Chart CI process must check that a chart version is unique - a chart can't
54 be created with the same version twice. This should be done against the
55 chart repo.
56
57Release Steps
58-------------
59
60All Helm charts are checked that the containers they use have a SemVer version
61tag
62
63A branch is created on the Helm charts repo, with the abbreviated name of the
64release - for example **sdcore-1.0**.
65
66To allow for future patches to go into the repo in a way that does not conflict
67with the version branch, each component repo's **VERSION** file should have it's
68minor version increased. (ex: 1.2.n to 1.3.0-dev, so future 1.3.n+1 component
69release can easily be created).
70
71The same should be done on Helm charts in the chart repos post release, but the
ajay2c0f6f42021-12-02 22:45:19 -080072versions there should not include a ``-dev`` suffix because chart publishing
Zack Williamsccaa38a2021-11-16 15:36:05 -070073requires that every new chart version be unique and unsuffixed SemVer is a
74more consistent release numbering pattern.
75
76Finally, the ``sdcore-helm-charts`` repo overall **VERSION** should also be incremented
77to the next minor version (1.6.0-dev) on the **master** branch, so all 1.0.x
78releases of the overall charts repo will happen on the **sdcore-1.0** branch.
79
80Creating releases on the 1.0.x branch
81"""""""""""""""""""""""""""""""""""""
82
83If a fix is needed only to the helm charts:
84
851. Make the fix on the master branch of sdcore-helm-charts (assuming that it is
86 required in both places).
87
882. After the master tests pass, manually cherry-pick the fix to the **sdcore-1.0**
89 branch (the Chart version would be different, requiring the manual step).
90
913. Cherry-picked patchsets on that branch will be checked by the **sdcore-1.0**
92 branch of tests.
93
944. When it passes, submitting the change will make a new 1.0.x release
95
965. Update the documentation to reflect the chart changes, a description of the
97 changes m, and increment the tag on the docs from 1.0.n to 1.0.n+1, to
98 reflect the patch change.
99
1006. If all the charts are updated and working correctly, create a new charts
101 point release by increasing the 1.0.n **VERSION** file in the
102 sdcore-helm-charts repo. This should be the same as the version in the
103 documentation. Immediately make another patch that returns the
104 ``sdcore-helm-charts`` **VERSION** to 1.0.n+1-dev, so that development
105 patches can continue on that branch.
106
107If a fix is needed to the components/containers that are included by the helm charts:
108
1091. Develop a fix to the issue on the master branch, get it approved after
110 passing master tests.
111
ajay2c0f6f42021-12-02 22:45:19 -08001122. If it does not exist, create an **sdcore-1.0** branch on the component repo,
Zack Williamsccaa38a2021-11-16 15:36:05 -0700113 starting at the commit where the **VERSION** of the component used in 1.0 was
114 created - this is known as "lazy branching".
115
116
ajay60fd69f2021-11-23 22:38:10 -08001173. Manually cherry-pick to the **sdcore-1.0** branch of the component, increment
Zack Williamsccaa38a2021-11-16 15:36:05 -0700118 the patch version, and test with the **sdcore-1.0** version of
119 sdcore-system-tests and helm charts.
120
1214. Update helm charts and go through the helm chart update process above
122