summaryrefslogtreecommitdiffstats
path: root/docs/release/release-automation.rst
blob: 213e5ad3b606189fa71441b3a924e53312fd18ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. SPDX-License-Identifier: CC-BY-4.0
.. (c) Open Platform for NFV Project, Inc. and its contributors

.. _release-automation:

==================
Release Automation
==================

This page describes how projects can take advantage of the release
automation introduced in Fraser for creating their stable branch, and
stable branch Jenkins jobs.

It also describes the structures of the ``releases`` directory and the
associated scripts.

Stable Branch Creation
----------------------

If your project participated in the last release (beginning with
Euphrates), perform the following steps:

#. Copy your project's release file to the new release directory. For
   example::

     cp releases/euphrates/apex.yaml releases/fraser/apex.yaml

#. For projects who are participating the in the stable release process for
   the first time, you can either copy a different project's file and
   changing the values to match your project, or use the following
   template, replacing values marked with ``<`` and ``>``:

   .. code-block:: yaml

       ---
       project: <opnfv-project-name>
       project-type: <opnfv-project-type>
       release-model: stable

       branches:
         - name: stable/<release>
           location:
             <project-repo>: <git-sha1>

#. Modify the file, replacing the previous stable branch name with the
   new release name, and the commit the branch will start at. For
   example:

   .. code-block:: yaml

     branches:
       - name: stable/fraser
         location:
           apex: <git-full-sha1>

#. If your project contains multiple repositories, add them to the list
   of branches. They can also be added later if more time is needed
   before the stable branch window closes.

   .. code-block:: yaml

     branches:
       - name: stable/fraser
         location:
           apex: <git-sha1>
       - name: stable/fraser
         location:
           apex-puppet-tripleo: <git-sha1>

#. Git add, commit, and git-review the changes. A job will be triggered
   to verify the commit exists on the branch, and the yaml file follows
   the scheme listed in ``releases/schema.yaml``

#. Once the commit has been reviewed and merged by Releng, a job will
   be triggered to create the stable branch Jenkins jobs under
   ``jjb/``.


Stable Release Tagging
----------------------

TBD

Release File Fields
-------------------

The following is a description of fields in the Release file, which are
verified by the scheme file at ``releases/schema.yaml``

project
  Project team in charge of the release.

release-model
  Release model the project follows.

  One of: stable, non-release

project-type
  Classification of project within OPNFV.

  One of: installer, feature, testing, tools, infra

upstream
  (Optional) Upstream OpenStack project assocated with this project.

releases
  List of released versions for the project.

  version
    Version of the release, must be in the format ``opnfv-X.Y.Z``.

  location
    Combination of repository and git hash to locate the release
    version.

    Example::

        opnfv-project: f15d50c2009f1f865ac6f4171347940313727547

branches
   List of stable branches for projects following the ``stable`` release-model.

   name
     Stable branch name. Must start with the string ``stable/``

   location
     Same syntax as ``location`` under ``releases``

release-notes
   Link to release notes for the projects per-release.


Scripts
-------

* ``create_branch.py -f <RELEASE_FILE>``

  Create branches in Gerrit listed in the release file.

  Must be ran from the root directory of the releng repository as the
  release name is extracted from the subdirectory under ``releases/``

  The Gerrit server can be changed by creating a ``~/releases.cfg``
  file with the following content::

    [gerrit]
    url=http://gerrit.example.com

  This will override the default configuration of using the OPNFV
  Gerrit server at https://gerrit.opnfv.org, and is primarily used for
  testing.

* ``create_jobs.py -f <RELEASE_FILE>``

  Modifies the jenkins job files for a project to add the stable branch
  stream. Assumes the jenkins jobs are found in the releng repository
  under ``jjb/<project>/``

* ``verify_schema -s <SCHEMA_FILE> -y <YAML_FILE>``

  Verifies the yaml file matches the specified jsonschema formatted
  file. Used to verify the release files under ``releases/``