C-Docs: move "Branching Strategy" from wiki
[csit.git] / docs / content / overview / csit / branching_strategy.md
1 ---
2 title: "Branching Strategy"
3 weight: 6
4 ---
5
6 # Branching Strategy
7
8 ## Definitions
9
10 **CSIT development branch:** A CSIT branch used for test development which has a
11 1:1 association with a VPP branch of the same name. CSIT development branches
12 are never used for operational testing of VPP patches or images.
13
14 **CSIT operational branch:** A CSIT branch pulled from a CSIT development or
15 release branch which is used for operational testing of the VPP branch
16 associated from its' parent branch. CSIT operational branches are named
17 `oper-<YYMMDD>` for master and `oper-<release>-<YYMMDD>` for release branches.
18 CSIT operational branches are the only branches which should be used to run
19 verify jobs against VPP patches or images.
20
21 **CSIT release branch:** A CSIT branch which is pulled from a development branch
22 and is associated with a VPP release branch. CSIT release branches are never
23 merged back into their parent branch and are never used for operational testing
24 of VPP patches or images.
25
26 ## VPP Selection of CSIT Operational Branches
27
28 Each VPP and release branch will have a script which specifies which CSIT
29 operational branch is used when executing the per patch verify jobs. This is
30 maintained in the VPP branch in the file
31 `.../vpp/build-root/scripts/csit-test-branch`.
32
33 ## Branches
34
35 ### Main development branch: 'master'
36
37 The CSIT development branch 'master' will be the main development for new VPP
38 feature tests that have not been included in a release. Weekly CSIT operational
39 branches will be pulled from 'master'. After validation of all CSIT verify jobs,
40 the VPP script 'csit-test-branch' will be updated with the latest CSIT
41 operational branch name. Older CSIT operational branches will be available for
42 manual triggered vpp-csit-verify-* jobs.
43
44 ### Release branch: 'rls1606', 'rls1609', ...
45
46 CSIT release branches shall be pulled from 'master' with the the convention
47 `rls<release>` (e.g. rls1606, rls1609). New tests that are developed for
48 existing VPP features will be committed into the 'master' branch, then
49 cherry-picked|double committed into the latest CSIT release branch.
50 Periodically CSIT operational branches will be pulled from the CSIT release
51 branch when necessary and the VPP release branch updated to use the new CSIT
52 operational branch.
53
54 **VPP branch diagram:**
55
56     -- master --------------------------------------------------------------->
57               \                           \
58                \--- stable/1606 ---[end]   \--- stable/1609---[end]
59
60
61 **CSIT branch diagram:**
62
63                         /--- oper-rls1606-160623
64                        / /--- oper-rls1606-$(DATE)
65                       / /          . . .
66                      / /                        /--- oper-rls1609-$(DATE)
67                     / /                        /          . . .
68                  /--- rls1606 ---[end]      /--- rls1609 ---[end]
69                 /        /                 /        /
70                / (cherry-picking)         / (cherry-picking)
71               /        /                 /        /
72     -- master --------------------------------------------------------------->
73                \ \          . . .
74                 \ \--- oper-$(DATE)
75                  \--- oper-160710
76
77 ## Creating a CSIT Operational Branch
78
79 ### Run verify weekly job
80
81 `csit-vpp-device-master-<OS>-<arch>-<testbed>-weekly` is run on the CSIT
82 development or release branch (e.g. 'master' or 'stable/1606') using the latest
83 VPP package set on nexus.fd.io for the associated VPP branch. Any anomalies will
84 have the root cause identified and be resolved in the CSIT development branch
85 prior to pulling the CSIT operational branch.
86
87 ### Pull CSIT operational branch from parent
88
89 The CSIT operational branch is pulled from the parent CSIT development or
90 release branch.
91
92 ### Run verify semiweekly job
93
94 `csit-vpp-device-master-<OS>-<arch>-<testbed>-semiweekly` is run on the CSIT
95 operational branch with the latest image of the associated VPP development or
96 release branch. This job is run to validate the next reference VPP build for
97 validating the results of all of the csit-vpp-verify* jobs.
98
99 ### Update VPP branch to use the new CSIT operational branch
100
101 Push a patch updating the VPP branch to use the new CSIT operational branch. The
102 VPP verify jobs will then be run and any anomalies will have the root cause
103 identified and fixed in the CSIT operational branch prior to 'csit-test-branch'
104 being merged.
105
106 ### Periodically lock/deprecate old CSIT Operational Branches
107
108 Periodically old CSIT operational branches will be locked and/or deprecated to
109 prevent changes being made to the operational branch.