Joey Armstrong | a144ef3 | 2024-01-11 11:26:41 -0500 | [diff] [blame] | 1 | .. _howto_release_components_onos_components: |
| 2 | |
Joey Armstrong | c9614ce | 2023-01-25 16:21:27 -0500 | [diff] [blame] | 3 | VOLTHA Components: ONOS |
| 4 | ======================= |
| 5 | |
| 6 | A few different processes exist for releasing the VOLTHA project and componets. |
| 7 | Some are released through github using branches/tags/downloads. |
| 8 | Others are released as packages on maven central. |
| 9 | |
| 10 | A jenkins job exists for releasing ONOS app |
| 11 | |
| 12 | - Maven central based release |
| 13 | - Release process requires some manual steps. |
| 14 | |
| 15 | - `Jenkins Release Job <https://jenkins.opencord.org/job/onos-app-release/>`_ |
| 16 | |
Joey Armstrong | 9a77106 | 2023-06-03 23:57:43 -0400 | [diff] [blame] | 17 | - `MVN Plugin Upgrade <https://gerrit.opencord.org/c/sadis/+/34230>`_ |
| 18 | - `5.11.0 (deploy) <https://gerrit.opencord.org/c/sadis/+/34231>`_ |
| 19 | - `5.12.0-SNAPSHOT (dev) <https://gerrit.opencord.org/c/sadis/+/34232>`_ |
| 20 | |
Joey Armstrong | c9614ce | 2023-01-25 16:21:27 -0500 | [diff] [blame] | 21 | - Initiate a build with parameters for the target component. |
| 22 | |
| 23 | - Use repository name not name of the app itself. |
| 24 | - Specify appVersion and apiVersion stored in the pom.xml file. |
| 25 | |
Joey Armstrong | 9a77106 | 2023-06-03 23:57:43 -0400 | [diff] [blame] | 26 | - Files modified by jenkins: pom.xml, app/pom.xml, api/pom.xml |
| 27 | |
| 28 | .. list-table:: Job paramters |
| 29 | :widths: 10, 40 |
| 30 | :header-rows: 1 |
| 31 | |
| 32 | * - Field |
| 33 | - Value |
| 34 | * - appRepo |
| 35 | - sadis |
| 36 | * - appName |
| 37 | - sadis |
| 38 | * - apiVersion |
| 39 | - 5.11.0 (pom.xml: 5.11.0-SNAPSHOT) |
| 40 | * - nextApiVersion |
| 41 | - 5.12.0 |
| 42 | * - version |
| 43 | - 5.11.0 |
| 44 | * - nextVersion |
| 45 | - 5.12.0 |
| 46 | * - branch |
| 47 | - master (?) |
| 48 | |
| 49 | |
Joey Armstrong | 4f93b76 | 2023-06-06 08:36:02 -0400 | [diff] [blame] | 50 | Jenkins Jobs |
| 51 | ^^^^^^^^^^^^ |
| 52 | |
Joey Armstrong | 1b8fdc3 | 2023-12-20 17:22:57 -0500 | [diff] [blame] | 53 | - Jenkins jobs from `release matrix: v2.12 <https://wiki.opencord.org>`_ |
Joey Armstrong | 4f93b76 | 2023-06-06 08:36:02 -0400 | [diff] [blame] | 54 | |
| 55 | - `changeset approval for job merge <https://gerrit.opencord.org/q/owner:do-not-reply%2540opennetworking.org>`_ |
Joey Armstrong | 9a77106 | 2023-06-03 23:57:43 -0400 | [diff] [blame] | 56 | - pom.xml non-SNAPSHOT (first approved changeset) |
Joey Armstrong | 4f93b76 | 2023-06-06 08:36:02 -0400 | [diff] [blame] | 57 | |
Joey Armstrong | 9a77106 | 2023-06-03 23:57:43 -0400 | [diff] [blame] | 58 | - `licensed <https://jenkins.opencord.org/job/verify_sadis_licensed/>`_ |
| 59 | - `verify <https://jenkins.opencord.org/job/verify_sadis_maven-test/>`_ |
Joey Armstrong | 4f93b76 | 2023-06-06 08:36:02 -0400 | [diff] [blame] | 60 | |
Joey Armstrong | 9a77106 | 2023-06-03 23:57:43 -0400 | [diff] [blame] | 61 | - pom.xml non-SNAPSHOT (second approved changeset) |
Joey Armstrong | 4f93b76 | 2023-06-06 08:36:02 -0400 | [diff] [blame] | 62 | |
Joey Armstrong | 9a77106 | 2023-06-03 23:57:43 -0400 | [diff] [blame] | 63 | - `publish <https://jenkins.opencord.org/job/maven-publish_sadis/>`_ |
| 64 | |
| 65 | - Job will modify pom.xml and create pull requests based on version strings. |
Joey Armstrong | c9614ce | 2023-01-25 16:21:27 -0500 | [diff] [blame] | 66 | |
| 67 | - NOTE: Two pull requests are created to modify pom.xml |
Joey Armstrong | 9a77106 | 2023-06-03 23:57:43 -0400 | [diff] [blame] | 68 | |
Joey Armstrong | c9614ce | 2023-01-25 16:21:27 -0500 | [diff] [blame] | 69 | - One for release (x.y.z) |
| 70 | - The second to revert to non-release version (x.(y+1).z-SNAPSHOT) |
| 71 | - Approve and merge the release version while performing the release. |
| 72 | - Once published approve the 2nd version change to re-attach the -SNAPSHOT suffix. |
| 73 | |
| 74 | - Version x.y.z-SNAPSHOT is the default non-release version. |
| 75 | - Jenkins job will morph x.y.z-SNAPSHOT into x.y.z for the release. |
| 76 | - A gerrit pull request will be created under the release requestor(s) name. |
| 77 | |
| 78 | - Approve the pom.xml pull request and merge. |
| 79 | - Merge will trigger (https://jenkins.opencord.org/job/maven-publish_sadis/ for sadis app, similar link for olt and other apps) that publish the artifact in the staging repo on oss.sonatype.org, you need to release it. |
| 80 | - Wait for build to complete |
| 81 | - Merge the patches here https://gerrit.opencord.org/q/owner:do-not-reply%2540opennetworking.org |
| 82 | |
Joey Armstrong | 9a77106 | 2023-06-03 23:57:43 -0400 | [diff] [blame] | 83 | - Artifact staging on sonatype, published to maven central: |
Joey Armstrong | c9614ce | 2023-01-25 16:21:27 -0500 | [diff] [blame] | 84 | |
| 85 | - Visit `https://oss.sonatype.org <https://oss.sonatype.org>`_ |
| 86 | - Login with ONF credentials |
| 87 | |
Joey Armstrong | 9a77106 | 2023-06-03 23:57:43 -0400 | [diff] [blame] | 88 | - In the Artifact Search box |
| 89 | |
| 90 | - Search for org.opencord |
| 91 | - Find the package of interest (pkg, app, api) |
| 92 | - Click 'Show All Versions' |
| 93 | - Verify the released version exists |
| 94 | |
Joey Armstrong | c9614ce | 2023-01-25 16:21:27 -0500 | [diff] [blame] | 95 | - Click on "Staging repositories" (in the left side navigation) |
| 96 | - In the top right search for last part of the app name (eg: olt) |
Joey Armstrong | 9a77106 | 2023-06-03 23:57:43 -0400 | [diff] [blame] | 97 | - Enable checkbox for the versioned package (status: closed). |
Joey Armstrong | c9614ce | 2023-01-25 16:21:27 -0500 | [diff] [blame] | 98 | - Click release (top left bar, small button) |
| 99 | - `Wait until artifacts are published <https://search.maven.org/search?q=g:org.opencord>`_ |
| 100 | |
| 101 | - Release all other apps/components (dependency hierarch): |
| 102 | |
| 103 | - Iterate over individual components in order of increasing dependency volume. |
| 104 | |
| 105 | - For ex olt depends on sadis |
| 106 | - Begin by releasing sadis first |
| 107 | - Once publishing has completed then olt can be released. |
| 108 | |
| 109 | - Verify expected dependent version has been released. |
| 110 | - Modify pom.xml, update dep version(s) from x.z.y-SNAPSHOT to x.y.z |
| 111 | - Commit and submit. |
| 112 | |