Apex: Fix CSIT snapshot files path
[releng.git] / docs / release / release-automation.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. SPDX-License-Identifier: CC-BY-4.0
3 .. (c) Open Platform for NFV Project, Inc. and its contributors
4
5 .. _release-automation:
6
7 ==================
8 Release Automation
9 ==================
10
11 This page describes how projects can take advantage of the release
12 automation introduced in Fraser for creating their stable branch, and
13 stable branch Jenkins jobs.
14
15 It also describes the structures of the ``releases`` directory and the
16 associated scripts.
17
18 Stable Branch Creation
19 ----------------------
20
21 If your project participated in the last release (beginning with
22 Euphrates), perform the following steps:
23
24 #. Copy your project's release file to the new release directory. For
25    example::
26
27      cp releases/euphrates/apex.yaml releases/fraser/apex.yaml
28
29 #. For projects who are participating the in the stable release process for
30    the first time, you can either copy a different project's file and
31    changing the values to match your project, or use the following
32    template, replacing values marked with ``<`` and ``>``:
33
34    .. code-block:: yaml
35
36        ---
37        project: <opnfv-project-name>
38        project-type: <opnfv-project-type>
39        release-model: stable
40
41        branches:
42          - name: stable/<release>
43            location:
44              <project-repo>: <git-sha1>
45
46 #. Modify the file, replacing the previous stable branch name with the
47    new release name, and the commit the branch will start at. For
48    example:
49
50    .. code-block:: yaml
51
52      branches:
53        - name: stable/fraser
54          location:
55            apex: <git-full-sha1>
56
57 #. If your project contains multiple repositories, add them to the list
58    of branches. They can also be added later if more time is needed
59    before the stable branch window closes.
60
61    .. code-block:: yaml
62
63      branches:
64        - name: stable/fraser
65          location:
66            apex: <git-sha1>
67        - name: stable/fraser
68          location:
69            apex-puppet-tripleo: <git-sha1>
70
71 #. Git add, commit, and git-review the changes. A job will be triggered
72    to verify the commit exists on the branch, and the yaml file follows
73    the scheme listed in ``releases/schema.yaml``
74
75 #. Once the commit has been reviewed and merged by Releng, a job will
76    be triggered to create the stable branch Jenkins jobs under
77    ``jjb/``.
78
79
80 Stable Release Tagging
81 ----------------------
82
83 TBD
84
85 Release File Fields
86 -------------------
87
88 The following is a description of fields in the Release file, which are
89 verified by the scheme file at ``releases/schema.yaml``
90
91 project
92   Project team in charge of the release.
93
94 release-model
95   Release model the project follows.
96
97   One of: stable, non-release
98
99 project-type
100   Classification of project within OPNFV.
101
102   One of: installer, feature, testing, tools, infra
103
104 upstream
105   (Optional) Upstream OpenStack project assocated with this project.
106
107 releases
108   List of released versions for the project.
109
110   version
111     Version of the release, must be in the format ``opnfv-X.Y.Z``.
112
113   location
114     Combination of repository and git hash to locate the release
115     version.
116
117     Example::
118
119         opnfv-project: f15d50c2009f1f865ac6f4171347940313727547
120
121 branches
122    List of stable branches for projects following the ``stable`` release-model.
123
124    name
125      Stable branch name. Must start with the string ``stable/``
126
127    location
128      Same syntax as ``location`` under ``releases``
129
130 release-notes
131    Link to release notes for the projects per-release.
132
133
134 Scripts
135 -------
136
137 * ``create_branch.py -f <RELEASE_FILE>``
138
139   Create branches in Gerrit listed in the release file.
140
141   Must be ran from the root directory of the releng repository as the
142   release name is extracted from the subdirectory under ``releases/``
143
144   The Gerrit server can be changed by creating a ``~/releases.cfg``
145   file with the following content::
146
147     [gerrit]
148     url=http://gerrit.example.com
149
150   This will override the default configuration of using the OPNFV
151   Gerrit server at https://gerrit.opnfv.org, and is primarily used for
152   testing.
153
154 * ``create_jobs.py -f <RELEASE_FILE>``
155
156   Modifies the jenkins job files for a project to add the stable branch
157   stream. Assumes the jenkins jobs are found in the releng repository
158   under ``jjb/<project>/``
159
160 * ``verify_schema -s <SCHEMA_FILE> -y <YAML_FILE>``
161
162   Verifies the yaml file matches the specified jsonschema formatted
163   file. Used to verify the release files under ``releases/``