Block Tizen Base Project SR
[scm/git-obs-mapping.git] / README
1 Overview
2 ========
3 In Tizen release infrastructure, Hudson/Jenkins will sync changes in gerrit to corresponding OBS project. The xml configuration file git-obs-mapping.xml specifies the OBS target project of each gerrit project.
4
5 Example
6 =======
7 Please note this is just one example, not real production configuration.
8
9 <?xml version="1.0" encoding="UTF-8" ?>
10 <mapping>
11   <default>
12     <path name="/">
13       <branch name="master" OBS_project="Tizen:Main" OBS_staging_project="Tizen:Main:build" />
14     </path>
15     <path name="/internal/" submission="N" /> 
16   </default>
17   <project name="/pkgs/m/mic">
18     <branch name="master" OBS_project="Tizen:Main" OBS_staging_project="Tizen:Main:build" />
19   </project>
20   <project name="/git-obs-mapping" submission="N" />
21   <project name="/pkgs/g/gcc">
22     <branch name="master" submission="N" />
23     <branch name="4.4.7" target OBS_project="Tizen:Main" OBS_staging_project="Tizen:Main:build" />
24     <branch name="4.4.7" OBS_project="Tools:dev" OBS_staging_project="Tools:dev:build" OBS_package="gcc-4.4.7" /> 
25   </project>
26 </mapping>
27
28 Rule
29 ====
30 This xml configuration file contains two parts: default section for overall configuration and individual project configuration. Hudson/Jenkins will read this file and determine the corresponding OBS project according the following rules:
31
32 1. Search whether individual project configuration exists.
33 1.1 One OBS target project must contain two attributions at least, OBS_project means the final target OBS project, OBS_staging_project means the staging build project. Hudson/Jenkins will sync gerrit project to OBS_staging_project directly, then create one OBS SR to request to merge to OBS_project according to whether this change modified changes file and attached one tag. As the example shows, the master branch of /pkgs/m/mic maps to Tizen:Main project and uses Tizen:Main:build as the staging project.
34 1.2 One branch could be mapped to multiply OBS project. The 4.4.7 branch of /pkgs/g/gcc maps to two OBS project Tizen:Main and Tools:dev.
35 1.3 If packaging directory contains multiply specfiles, use attribution OBS_package to specify the specfile name, like pkgs/g/gcc will use gcc-4.4.7.spec when submitting to Tools:dev. 
36 1.4 When attribution submission equals N, it will block Hudson/Jenkisn sync this project or branch. As example shows, the whole project git-obs-mapping and the master branch of /pkgs/g/gcc are blocked. If don't contains this attribution, it means submission="Y".  
37
38 2. If individual configuration for this project doesn't exist and submission doesn't be blocked, check whether default section contains mapping setting for this branch. 
39 2.1 Search configuration from leaf to root path. Using /pkgs/a/abc project as example, system will search path configuration follow this priority /pkg/a/ -> /pkg/ -> / . 
40 2.2 The attribution submiss="N" in patch configuation also can block all project under this path, like all projects under /internal/ are blocked as example shows. 
41
42 3.  Other branches will be ignored.