Joey Armstrong | f6dde7a | 2024-02-01 10:09:20 -0500 | [diff] [blame] | 1 | .. _Release Repository ci-management: |
| 2 | |
| 3 | Repository: ci-management |
| 4 | ========================= |
| 5 | |
| 6 | - `repo:ci-management <https://gerrit.opencord.org/plugins/gitiles/ci-management>`_ |
| 7 | - First repsitory to release. |
| 8 | - One of only three repositories to branch-then-tag. |
| 9 | - Dependency for releasing all other repositories, test suites are |
| 10 | launched from release branch=votha-X.Y. |
| 11 | |
| 12 | Release: {Tag,Branch}ing script |
| 13 | ------------------------------- |
Joey Armstrong | 81cb55b | 2024-04-19 11:45:12 -0400 | [diff] [blame] | 14 | `repo:voltha-release <https://github.com/joey-onf/voltha-release>`_ :: `bttb.sh <https://github.com/joey-onf/voltha-release/blob/origin/master/bttb.sh>`_ (branch-tag/or/tag-branch) |
Joey Armstrong | f6dde7a | 2024-02-01 10:09:20 -0500 | [diff] [blame] | 15 | |
| 16 | The bttb.sh script will perform several tasks to release a repository. |
| 17 | |
| 18 | - Clone a named sandbox. |
| 19 | - Identify release activity by repository name: tag-branch or branch-tag. |
| 20 | |
| 21 | ## Identify release activity by repository (TagBranch-or-BranchTag) |
| 22 | |
| 23 | .. code :: python |
| 24 | |
| 25 | # Identify by repository name then tag-branch or branch-tag: |
| 26 | if repo in ['ci-management', 'voltha-helm-charts', 'voltha-system-tests']: |
| 27 | create_branch voltha-X.Y |
| 28 | create_tag attached to branch=voltha-X.Y |
| 29 | else: |
| 30 | create_tag 2.12.0 OR v2.12.0 |
| 31 | create_branch voltha-2.12 attached to tag=2.12.0 |
| 32 | |
| 33 | % git push {tags,branches} |
| 34 | |
| 35 | ## Create a release dev branch for edits |
| 36 | |
| 37 | .. code-block:: shell-session |
| 38 | :caption: Identify release activity by repository |
| 39 | |
| 40 | % git clone -b dev-joey voltha-2.12 (or origin/voltha-2.12) |
| 41 | |
| 42 | # Edit VERSION file: X.Y.{1+Z} |
| 43 | % echo 'X.Y.{1+Z}' > VERSION |
| 44 | |
| 45 | # Edit .gitreview: defaultbranch=voltha-X.Y |
| 46 | % grep -v 'defaultbranch' .gitreview > .gitreview.tmp |
| 47 | % echo "defaultbranch=voltha-2.12" >> .gitreview.tmp |
| 48 | % mv -f .gitreview.tmp .gitreview |
| 49 | |
| 50 | ## Command usage: bttb.sh |
| 51 | |
| 52 | .. code-block:: shell-session |
| 53 | :caption: Release tagging and branching |
| 54 | |
| 55 | % git clone ssh://gerrit.opencord.org:29418/voltha-release |
| 56 | % cd voltha-release |
| 57 | |
| 58 | % ./bttb.sh --help |
| 59 | |
| 60 | declare -a args=() |
| 61 | |
| 62 | args+=('--clean') # Remove existing checkouts |
| 63 | args+=('--edit') # Edit VERISON, commit message, etc |
| 64 | |
| 65 | args+=('--[no-]gerrit') # View repo branch & tags early |
| 66 | args+=('--sandbox' './sandbox') # git clone target directory |
| 67 | |
| 68 | args+=('--repo' 'ci-management') |
| 69 | args+=('--version' '2.12') # votlha-2.12 release |
| 70 | |
| 71 | args+=('--jira' 'VOL-5020') # Jira ticket: release the repository |
| 72 | args+=('--jira' 'VOL-5021') # addendum |
| 73 | args+=('--jira' 'VOL-5022') |
| 74 | |
| 75 | # Generate branch={master,voltha-2.12} commit messages |
| 76 | args+=('--commit-message-dir' "${PWD}/sandbox/messages") |
| 77 | |
| 78 | % ./bttb.sh "${args[@]}" 2>&1 | tee ci-management.log |
| 79 | |
| 80 | See Also |
| 81 | -------- |
| 82 | https://docs.voltha.org/master/release_notes/release_process.html |