Merge "Adjust code after branching silicon"
[docs.git] / docs / release-process / branch-cutting.rst
index eb2cd5b62714e9f0e6d5cfa6f8be01342fe9e9a1..517d04dd177338f49916c3b174036a338c57bc3a 100644 (file)
@@ -3,134 +3,205 @@ Branch Cutting
 **************
 
 This page documents the current branch cutting tasks that are needed
-to be performed at various milestones and which team has the necessary
-permissions in order to perform the necessary task in Parentheses.
+to be performed at RC0 and which team has the necessary permissions
+in order to perform the necessary task in Parentheses.
 
-M5 Offset 2
-===========
+JJB (releng/builder)
+--------------------
 
-JJB
----
+#. Export ``${NEXT_RELEASE}`` and ``${CURR_RELEASE}`` with new and current release names.
+   **(releng/builder committers)**
 
-- Export ${NEXT_RELEASE} and ${CURR_RELEASE} with new and current release names.
-  **(releng/builder committers)**
+   .. code-block:: bash
 
-  .. code-block:: bash
+      export CURR_RELEASE="Silicon"
+      export NEXT_RELEASE="Phosphorus"
 
-     export NEXT_RELEASE="Nitrogen"
-     export CURR_RELEASE="Carbon"
+#. Run the script ``cut-branch-jobs.py`` to generate next release jobs.
+   **(releng/builder committers)**
 
-- Change JJB yaml files from `stream:carbon` branch pointer from `master -> stable/${CURR_RELEASE,,}`
-  and create new `stream: ${NEXT_RELEASE,,}` branch pointer to branch master. This
-  requires handling two different file formats interspersed with in autorelease projects.
-  **(releng/builder committers)**
+   .. code-block:: bash
 
-  .. code-block:: yaml
+      python scripts/cut-branch-jobs.py $CURR_RELEASE $NEXT_RELEASE jjb/
+      pre-commit run --all-files
+
+   .. note:: ``pre-commit`` is necessary to adjust the formatting of the generated YAML.
+
+   This script changes JJB yaml files to insert the next release configuration
+   by updating streams and branches where relevant. For example if ``master``
+   is currently Silicon, the result of this script will update config blocks
+   as follows:
+
+   Update multi-streams:
+
+   .. code-block:: yaml
 
       stream:
-        - Nitrogen:
+        - Phosphorus:
             branch: master
-        - Carbon:
-            branch: stable/carbon
+        - Silicon:
+            branch: stable/silicon
 
-  .. code-block:: yaml
+   Insert project new blocks:
+
+   .. code-block:: yaml
 
       - project:
-          name: aaa-carbon
+          name: aaa-phosphorus
           jobs:
             - '{project-name}-verify-{stream}-{maven}-{jdks}'
-          stream: nitrogen
+          stream: phosphorus
           branch: master
 
-  - The above manual process of updating individual files is automated with the script.
-    **(releng/builder committers)**
-
-  .. code-block:: bash
-
-      cd builder/scripts/branch_cut
-      ./branch_cutter.sh -n $NEXT_RELEASE -c $CURR_RELEASE
+      - project:
+          name: aaa-silicon
+          jobs:
+            - '{project-name}-verify-{stream}-{maven}-{jdks}'
+          stream: silicon
+          branch: stable/silicon
 
-- Review and submit the changes to releng/builder project. **(releng/builder committers)**
+#. Review and submit the changes to releng/builder project. **(releng/builder committers)**
 
 Autorelease
 -----------
 
-- Block submit permissions for registered users and elevate RE's committer rights on gerrit.
-  **(Helpdesk)**
+#. Block submit permissions for registered users and elevate RE's committer rights on gerrit.
+   **(Helpdesk)**
+
+   .. figure:: images/gerrit-update-committer-rights.png
+
+   .. note::
+
+      Enable **Exclusive** checkbox for the submit button to override any existing permissions.
+
+#. Enable create reference permissions on gerrit for RE's to submit .gitreview patches.
+   **(Helpdesk)**
+
+   .. figure:: images/gerrit-update-create-reference.png
+
+   .. note::
+
+      Enable Exclusive checkbox override any existing permissions.
+
+#. Start the branch cut job or use the manual steps below for branch cutting autorelease. **(Release Engineering Team)**
+#. Start the version bump job or use the manual steps below for version bump autorelease. **(Release Engineering Team)**
+#. Merge all .gitreview patches submitted though the job or manually. **(Release Engineering Team)**
+#. Remove create reference permissions set on gerrit for RE's. **(Helpdesk)**
+#. Merge all version bump patches in the order of dependencies. **(Release Engineering Team)**
+#. Re-enable submit permissions for registered users and disable elevated RE committer rights on gerrit. **(Helpdesk)**
+#. Notify release list on branch cutting work completion. **(Release Engineering Team)**
+
+
+Branch cut job (Autorelease)
+----------------------------
+Branch cutting can be performed either through the job or manually.
+
+#. Start the autorelease-branch-cut job
+   **(Release Engineering Team)**
+
+Manual steps to branch cut (Autorelease)
+----------------------------------------
+
+#. Setup releng/autorelease repository.
+   **(Release Engineering Team)**
+
+   .. code-block:: bash
+
+       git review -s
+       git submodule foreach 'git review -s'
+       git checkout master
+       git submodule foreach 'git checkout master'
+       git pull --rebase
+       git submodule foreach 'git pull --rebase'
+
+#. Enable create reference permissions on gerrit for RE's to submit .gitreview patches.
+   **(Helpdesk)**
+
+   .. figure:: images/gerrit-update-create-reference.png
+
+   .. note::
+
+      Enable Exclusive check-box override any existing permissions.
+
+#. Create stable/${CURR_RELEASE} branches based on HEAD master.
+   **(Release Engineering Team)**
 
-  .. figure:: images/gerrit-update-committer-rights.png
+   .. code-block:: bash
 
-  .. note::
+       git checkout -b stable/${CURR_RELEASE,,} origin/master
+       git submodule foreach 'git checkout -b stable/${CURR_RELEASE,,} origin/master'
+       git push gerrit stable/${CURR_RELEASE,,}
+       git submodule foreach 'git push gerrit stable/${CURR_RELEASE,,}'
 
-     Enable **Exclusive** checkbox for the submit button to override any existing persmissions.
+#. Contribute .gitreview updates to stable/${CURR_RELEASE,,}.
+   **(Release Engineering Team)**
 
-- Setup releng/autorelease repository.
-  **(Release Engineering Team)**
+   .. code-block:: bash
 
-  .. code-block:: bash
+       git submodule foreach sed -i -e "s#defaultbranch=master#defaultbranch=stable/${CURR_RELEASE,,}#" .gitreview
+       git submodule foreach git commit -asm "Update .gitreview to stable/${CURR_RELEASE,,}"
+       git submodule foreach 'git review -t ${CURR_RELEASE,,}-branch-cut'
+       sed -i -e "s#defaultbranch=master#defaultbranch=stable/${CURR_RELEASE,,}#" .gitreview
+       git add .gitreview
+       git commit -s -v -m "Update .gitreview to stable/${CURR_RELEASE,,}"
+       git review -t  ${CURR_RELEASE,,}-branch-cut
 
-      git review -s
-      git submodule foreach 'git review -s'
-      git checkout master
-      git submodule foreach 'git checkout master'
-      git pull --rebase
-      git submodule foreach 'git pull --rebase'
+Version bump job (Autorelease)
+------------------------------
+Version bump can performed either through the job or manually.
 
-- Create stable/${CURR_RELEASE} branches based on HEAD master.
-  **(Release Engineering Team)**
+#. Start the autorelease-version-bump-${NEXT_RELEASE,,} job
+   **(Release Engineering Team)**
 
-  .. code-block:: bash
+   .. note::
 
-      git submodule foreach 'git checkout -b stable/${CURR_RELEASE,,} origin/master'
-      git push gerrit stable/${CURR_RELEASE,,}
-      git submodule foreach 'git push gerrit stable/${CURR_RELEASE,,}'
+      Enabled BRANCH_CUT and disable DRY_RUN to run the job for branch cut
+      work-flow. The version bump job can be run only on the master branch.
 
-- Enable create reference permissions on gerrit for RE's to submit .gitreview patches.
-  **(Helpdesk)**
+Manual steps to version bump (Autorelease)
+------------------------------------------
 
-  .. figure:: images/gerrit-update-create-reference.png
+#. Version bump master by x.(y+1).z. **(Release Engineering Team)**
 
-  .. note::
+   .. code-block:: bash
 
-     Enable Exclusive checkbox override any existing persmissions.
+       git checkout master
+       git submodule foreach 'git checkout master'
+       pip install lftools
+       lftools version bump ${CURR_RELEASE}
 
-- Contribute .gitreview updates to stable/${CURR_RELEASE,,}.
-  **(Release Engineering Team)**
+#. Make sure the version bump changes does not modify anything under scripts or pom.xml.
+   **(Release Engineering Team)**
 
-  .. code-block:: bash
+   .. code-block:: bash
 
-      git submodule foreach sed -i -e "s#defaultbranch=master#defaultbranch=stable/${CURR_RELEASE,,}#" .gitreview
-      git submodule foreach git commit -asm "Update .gitreview to stable/${CURR_RELEASE,,}"
-      git submodule foreach 'git review -t ${CURR_RELEASE,,}-branch-cut'
-      sed -i -e "s#defaultbranch=master#defaultbranch=stable/${CURR_RELEASE,,}#" .gitreview
-      git add .gitreview
-      git commit -s -v -m "Update .gitreview to stable/${CURR_RELEASE,,}"
-      git review -t  ${CURR_RELEASE,,}-branch-cut
+       git checkout pom.xml scripts/
 
-- Merge all .gitreview patches submitted in the above step. **(Release Engineering Team)**
-- Remove create reference permissions set on gerrit for RE's. **(Helpdesk)**
-- Version bump master by x.(y+1).z. **(Release Engineering Team)**
+#. Push version bump master changes to gerrit. **(Release Engineering Team)**
 
-  .. code-block:: bash
+   .. code-block:: bash
 
-      git checkout master
-      git submodule foreach 'git checkout master'
-      pip install lftools
-      lftools version bump ${CURR_RELEASE}
+       git submodule foreach 'git commit -asm "Bump versions by x.(y+1).z for next dev cycle"'
+       git submodule foreach 'git review -t ${CURR_RELEASE,,}-branch-cut'
 
-- Exclude version bump changes to release notes. **(Release Engineering Team)**
+#. Merge the patches in order according to the merge-order.log file found
+   in autorelease jobs. **(Release Engineering Team)**
 
-  .. code-block:: bash
+   .. note::
 
-      git checkout pom.xml scripts/
+      The version bump patches can be merged more quickly by performing a local
+      build with ``mvn clean deploy -DskipTests`` to prime Nexus with the new
+      version updates.
 
-- Push version bump master changes to gerrit. **(Release Engineering Team)**
+Documentation post branch tasks
+-------------------------------
 
-  .. code-block:: bash
+#. Git remove all files/directories from the ``docs/release-notes/*`` directory.
+   **(Release Engineering Team)**
 
-      git submodule foreach 'git commit -asm "Bump versions by x.(y+1).z for next dev cycle"'
-      git submodule foreach 'git review -t nitrogen-br-cut'
+   .. code-block:: bash
 
-- Merge all version bump patches in the order of dependencies. **(Release Engineering Team)**
-- Re-enable submit permissions for registered users and disable elevated RE committer rights on gerrit. **(Helpdesk)**
-- Notify release list on branch cutting work completion. **(Release Engineering Team)**
+       git checkout master
+       git rm -rf docs/release-notes/<project file and/or folder>
+       git commit -sm "Reset release notes for next dev cycle"
+       git review