Docs: Correct title
[appc/deployment.git] / docs / APPC Deployment Guidelines / APPC Release Guidelines.rst
1 .. ============LICENSE_START==========================================
2 .. ===================================================================
3 .. Copyright © 2020 AT&T Intellectual Property. All rights reserved.
4 .. ===================================================================
5 .. Licensed under the Creative Commons License, Attribution 4.0 Intl.  (the "License");
6 .. you may not use this documentation except in compliance with the License.
7 .. You may obtain a copy of the License at
8 .. 
9 ..  https://creativecommons.org/licenses/by/4.0/
10 .. 
11 .. Unless required by applicable law or agreed to in writing, software
12 .. distributed under the License is distributed on an "AS IS" BASIS,
13 .. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 .. See the License for the specific language governing permissions and
15 .. limitations under the License.
16 .. ============LICENSE_END============================================
17
18 ==============
19 Releasing APPC
20 ==============
21
22 Introduction
23 ============
24
25 This document will go over how to perform an official APPC release on ONAP. This document only applies to PTLs and
26 committers, since certain permissions are required to perform an official release.
27
28 Releasing the APPC Parent Files
29 ===============================
30
31 First we will release the APPC parent files, since they are used by the main APPC project. Release version for the
32 parent files start with a "2". For example, "2.7.1". This keeps the parent version differentiated from the other APPC
33 versions, which start with a "1".
34
35 1. Go to the appc/parent Gerrit page.
36 2. Find the most recent gerrit review that has been merged. Leave a comment on this review with the words:
37    "stage-maven-release". This will trigger the staging job.
38 3. Check the Jenkins job `appc-parent-maven-stage-master <https://jenkins.onap.org/view/appc/job/
39    appc-parent-maven-stage-master/>`_. You can monitor the staging build job from here.
40 4. Once the Jenkins build job is finished, note the number of that build job.
41 5. Open your local copy of the appc/parent repository. Go to the "releases" directory.
42 6. Copy one of the existing release files in that directory. Rename the new file with the version number that you are
43    releasing.
44 7. Open the new file. Update the "version:" with the version number that you are releasing. Update the "log_dir:" with
45    the Jenkins job number from step 4.
46 8. Commit and push this new file to Gerrit. You can use a commit title like "Add 2.7.1 release file" or something
47    similar.
48 9. Once this change is merged in Gerrit, a new release for org.onap.appc.parent will be created in Nexus.
49
50 Releasing the Main APPC Project
51 ===============================
52
53 1. First, references to the appc parent files need to be set to match the version of the parent files that you just
54    released, rather than a snapshot version. You can search for the text "org.onap.appc.parent" in all of the pom.xml
55    files in the appc repository. Perform a find/replace on entire version tag "<version>...</version>" for the parent
56    file in order to update the APPC parent version.
57 2. Commit and push this change to Gerrit. Merge the change.
58 3. Once the merge is complete, leave a comment on the review with the text "stage-maven-release". (This is assuming that
59    your parent change was the lastest change merged, if it was not, leave the "stage-maven-release" comment on
60    whichever review was most recently merged).
61 4. Check the Jenkins job `appc-maven-stage-master <https://jenkins.onap.org/view/appc/job/appc-maven-stage-master/>`_.
62    You can monitor the staging build job from here.
63 5. Once the Jenkins build job is finished, note the number of that build job.
64 6. Open your local copy of the appc repository. Go to the "releases" directory.
65 7. Copy one of the existing release files in that directory. Rename the new file with the version number that you are
66    releasing.
67 8. Open the new file. Update the "version:" with the version number that you are releasing. Update the "log_dir:" with
68    the Jenkins job number from step 4.
69 9. Commit and push this new file to Gerrit. You can use a commit title like "Add 1.7.1 release file" or something
70    similar.
71 10. Once this change is merged in Gerrit, a new release for org.onap.appc will be created in Nexus. 
72
73 Releasing the APPC CDT Project
74 ==============================
75
76 1. Go to the appc/cdt Gerrit page.
77 2. Find the most recent gerrit review that has been merged. Leave a comment on this review with the words:
78    "stage-maven-release". This will trigger the staging job.
79 3. Check the Jenkins job `appc-cdt-maven-stage-master <https://jenkins.onap.org/view/appc/job/
80    appc-cdt-maven-stage-master/>`_. You can monitor the staging build job from here.
81 4. Once the Jenkins build job is finished, note the number of that build job.
82 5. Open your local copy of the appc/cdt repository. Go to the "releases" directory.
83 6. Copy one of the existing release files in that directory. Rename the new file with the version number that you are
84    releasing.
85 7. Open the new file. Update the "version:" with the version number that you are releasing. Update the "log_dir:" with
86    the Jenkins job number from step 4.
87 8. Commit and push this new file to Gerrit. You can use a commit title like "Add 1.7.1 release file" or something
88    similar.
89 9. Once this change is merged in Gerrit, a new release for org.onap.appc.cdt will be created in Nexus.
90
91 Releasing the APPC Docker Images
92 ================================
93
94 Update the APPC Artifact Download Versions
95 ------------------------------------------
96
97 The following operations should be performed in your local copy of the appc/deployment repository.
98
99 1. Open the "installation/appc/pom.xml" file.
100
101    a. Set the "<appc.release.version>" property to the version of APPC that you just released.
102    b. Set the "<appc.cdt.version>" property to the version of APPC CDT that you just released.
103
104 2. Open the "cdt/pom.xml" file.
105
106    a. Set the "<appc.release.version>" to the version of APPC CDT that you just released.
107
108 3. Open the "installation/appc/src/main/docker/Dockerfile" file.
109
110    a. Make sure that the ccsdk image version listed on the "FROM" line is set to the released (non snapshot) version of
111       ccsdk that you want to use to build APPC on.
112
113 4. Commit and push these changes to Gerrit. Merge the change, once the verify job completes.
114
115 Prepare to Release the Docker Images
116 ------------------------------------
117
118 1. Go to the appc/deployment Gerrit page.
119 2. Find the most recent gerrit review that has been merged. Leave a comment on this review with the words:
120    "stage-docker-release". This will trigger the staging job.
121 3. Check the Jenkins job `appc-deployment-maven-docker-stage-master <https://jenkins.onap.org/view/appc/job/
122    appc-deployment-maven-docker-stage-master/>`_. You can monitor the docker staging build job from here.
123 4. Once the Jenkins build job is finished, note the number of that build job.
124 5. Open the "Console Output" for the build job. You may need to click the "Full Log" link to see the whole log.
125 6. Search the page for the text "tag 2". Copy the tag text (this should be the tag with the date time stamp).
126
127 Check the Docker Images Before Release
128 --------------------------------------
129
130 Optionally, you can download the staged Docker images, and make sure everything is correct, before releasing them.
131
132 You can use the Docker tag you copied from Jenkins (from step 6 of the "Prepare to Release the Docker Images" section)
133 and download this Docker image:
134
135 .. code:: bash
136
137   docker pull nexus3.onap.org:10001/onap/appc-image:<image tag from Jenkins>
138   docker pull nexus3.onap.org:10001/onap/appc-cdt-image:<image tag from Jenkins>
139
140 Release the Docker Images
141 -------------------------
142
143 1. Open your local copy of the appc/deployment repository. Go to the "releases" directory.
144 2. Copy one of the existing release files in that directory. Rename the new file with the version number that you are
145    releasing, followed by the text "-container".
146 3. Open the new file.
147
148    a. Update the "container_release_tag:" with the version number that you are releasing.
149    b. Update the "log_dir:" with the Jenkins appc-deployment-maven-docker-stage-master job number that built the staging
150       images (from step 4 of the "Prepare to Release the Docker Images" section).
151    c. Update the "ref:" with the git commit id of the Gerrit review where you made the "stage-docker-release" comment.
152       (from step 2 of the "Prepare to Release the Docker Images" section).
153    d. Under the "containers:" section, update both "version:" with the image tag from Jenkins (from step 6 of the
154       "Prepare to Release the Docker Images" section).
155
156 4. Commit and push this new file to Gerrit. You can use a commit title like "Add 1.7.1 container release file" or
157    something similar.
158 5. Once this change is merged in Gerrit, the appc-image and appc-cdt-image Docker images will be released in Nexus 3
159
160
161
162