Merge "Fix MRI project list"
[docs.git] / docs / release-process / branch-cutting.rst
index 1c8d2baf6fe8d11a1f8de776d53a6e77633370c3..4353792284b0d8d4eb5e72f38c73bc2f73844d71 100644 (file)
@@ -3,42 +3,191 @@ 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)**
 
-- Change JJB stream:boron branch pointer from master -> stable/boron
-  **(releng/builder committers)**
-- Create new stream:carbon branch pointer to branch master
-  **(releng/builder committers)**
+   .. code-block:: bash
 
-Process
--------
+      export NEXT_RELEASE="Neon"
+      export CURR_RELEASE="Fluorine"
 
-- Disable Submit permission on master branch
-  **(Helpdesk)**
-- Create stable/boron branches based on HEAD master
-  **(Release Engineering Team)**
-- Contribute .gitreview updates to stable/boron
-  **(Release Engineering Team)**
+#. Change JJB yaml files from `stream:fluorine` 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
 
-      git submodule foreach sed -i -e 's#defaultbranch=master#defaultbranch=stable/boron#' .gitreview
-      git submodule foreach git commit -asm "Update .gitreview to stable/boron"
+      stream:
+        - Neon:
+            branch: master
+        - Fluorine:
+            branch: stable/fluorine
 
-- Version bump master by 0.1.0
-  **(Release Engineering Team)**
+   .. code-block:: yaml
 
-  .. code-block:: bash
+      - project:
+          name: aaa-neon
+          jobs:
+            - '{project-name}-verify-{stream}-{maven}-{jdks}'
+          stream: neon
+          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
+
+#. 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)**
+
+   .. 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.
 
-      git submodule foreach version.sh bump Boron
-      git submodule foreach git commit -asm "Bump versions by 0.1.0 for next dev cycle"
+#. Create stable/${CURR_RELEASE} branches based on HEAD master.
+   **(Release Engineering Team)**
+
+   .. code-block:: bash
+
+       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,,}'
+
+#. Contribute .gitreview updates to stable/${CURR_RELEASE,,}.
+   **(Release Engineering Team)**
+
+   .. 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
+
+Version bump job (Autorelease)
+------------------------------
+Version bump can performed either through the job or manually.
+
+#. Start the autorelease-version-bump-${NEXT_RELEASE,,} job
+   **(Release Engineering Team)**
+
+   .. note::
+
+      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.
+
+Manual steps to version bump (Autorelease)
+------------------------------------------
+
+#. Version bump master by x.(y+1).z. **(Release Engineering Team)**
+
+   .. code-block:: bash
+
+       git checkout master
+       git submodule foreach 'git checkout master'
+       pip install lftools
+       lftools version bump ${CURR_RELEASE}
+
+#. Make sure the version bump changes does not modify anything under scripts or pom.xml.
+   **(Release Engineering Team)**
+
+   .. code-block:: bash
+
+       git checkout pom.xml scripts/
+
+#. Push version bump master changes to gerrit. **(Release Engineering Team)**
+
+   .. code-block:: bash
+
+       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'
+
+#. Merge the patches in order according to the merge-order.log file found
+   in autorelease jobs. **(Release Engineering Team)**
+
+   .. note::
+
+      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.
+
+Documentation post branch tasks
+-------------------------------
+
+#. Git remove all files/directories from the docs/release-notes/* directory. **(Release Engineering Team)**
+
+  .. code-block:: bash
 
-- Re-enable Submit permission on master branch
-  **(Helpdesk)**
+      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