Pin pygments to 2.3.x
[integration/packaging.git] / docs / packaging-releases.rst
1 Packaging OpenDaylight Releases
2 ===============================
3
4 These docs are for Integration/Packaging committers to reference while they
5 package OpenDaylight releases and service releases. Users should not, and would
6 not be able to due to missing permissions, follow this guide. This process is
7 not needed for Continuous Delivery pipeline packages, just formal releases.
8
9 Building on CentOS Community Build System
10 -----------------------------------------
11
12 OpenDaylight builds and hosts formal releases and service releases on the
13 CentOS Community Build System (CBS). Building on the CBS requires human
14 intervention, as the required credentials can't be stored on our build
15 systems. Continuous Delivery builds are hosted on Nexus to remove this need
16 for a human.
17
18 Find the release tarball. Make sure it's the one that has been promoted to the
19 opendaylight.releases Nexus repository, not the same build as a Release
20 Candidate before promotion. The packaging logic will only give release version
21 numbers for builds of artifacts from this release repository.
22
23 https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/karaf/0.8.1/karaf-0.8.1.tar.gz
24
25 Use the packaging-build-rpm job, for the right stream, to package the tarball.
26
27 TODO: Document getting permission to run jobs on RelEng Jenkins.
28
29 https://jenkins.opendaylight.org/releng/job/packaging-build-rpm-oxygen/
30
31 If it builds and passes tests, download the resulting source RPM from Nexus.
32
33 https://nexus.opendaylight.org/content/repositories/opendaylight-oxygen-epel-7-x86_64-devel/
34
35 Build the SRPM on the CentOS CBS, using the build target for this release.
36
37 TODO: Document adding build targets to CBS, only needed for new major releases
38 TODO: Document getting CBS permissions
39
40     cbs build nfv7-opendaylight-8-el7 opendaylight-8.1.0-1.el7.src.rpm
41
42 After the SRPM uploads and the noarch RPM builds, tag it to the appropriate
43 build tags for this release. If this is the first time tag has been used,
44 you'll also need to add the package to the tag.
45
46 Releases should typically be tagged to three related tags.
47
48 * Candidate tag for this major version
49
50     cbs add-pkg nfv7-opendaylight-8-candidate opendaylight --owner=dfarrell07
51     cbs tag-build nfv7-opendaylight-8-candidate opendaylight-8.1.0-1.el7
52
53 * Release tag for this major.minor version
54
55     cbs add-pkg nfv7-opendaylight-81-release opendaylight --owner=dfarrell07
56     cbs tag-build nfv7-opendaylight-81-release opendaylight-8.1.0-1.el7
57
58 * Release tag for this major version
59
60     cbs tag-build nfv7-opendaylight-8-release opendaylight-8.1.0-1.el7
61
62 It may be advisable to fully do the candidate tag first, and only once everything
63 is verified working do the release tags.
64
65 Wait for the repository to regenerate and show the new package.
66
67 http://cbs.centos.org/repos/nfv7-opendaylight-8-candidate/x86_64/os/Packages/
68
69 Once the RPM is available on the CBS, test it with the test-rpm-master job.
70
71 https://jenkins.opendaylight.org/releng/job/packaging-test-rpm-master/
72
73 Updating Docs
74 -------------
75
76 Update the downloads page to point at the new RPM.
77
78 https://git.opendaylight.org/gerrit/gitweb?p=docs.git;a=blob;f=docs/downloads.rst
79
80 Update the Int/Pack repositories docs with any repo additions/removals.
81
82 :ref:`intpak-rpm-repos`
83
84 Adding Example Configuration Files
85 ----------------------------------
86
87 Add example configuration files for any new RPM repositories.
88
89 https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=tree;f=packages/rpm/example_repo_configs
90
91 As a change that depends on the repository configuration file change, add a
92 Packer variables file for the ODL version and CBS repository URL.
93
94 https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=tree;f=packer/vars
95
96 TODO: Document building/pushing VMs/containers after INTPAK-12 automation
97
98 Updating Tests for Release Events
99 ---------------------------------
100
101 Various release-related events require changes in packaging test coverage.
102
103 Tests need to be updated when:
104
105 * New releases or service releases are cut
106 * Old releases or service releases go End-of-Life (EOL)
107 * New branches are added
108 * Branches go EOL
109 * Old temporary autorelease, snapshot or multipatch builds expire (every 30-60
110   days)
111
112 Updating Unit Tests
113 +++++++++++++++++++
114
115 There are unit tests in Int/Pack that verify the Python build automation
116 scripts.
117
118 https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob;f=packages/test_lib.py
119
120 Update the unit tests by grepping around and copying examples.
121
122 Updating Functional Tests
123 +++++++++++++++++++++++++
124
125 There are functional tests in RelEng/Builder that build and test packages to
126 verify build jobs.
127
128 https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=tree;f=jjb/packaging
129
130 Update the functional tests by grepping around and copying examples. Make sure
131 to update both the test cases and the default parameters.
132
133 Updating Puppet
134 ---------------
135
136 The puppet-opendaylight Rakefile, which drives our functional Beaker tests,
137 needs to be updated when a new ODL major release comes out. It does not need to
138 be updated for SRs because it pulls the latest from the <release>-devel Nexus
139 repo (for a diffrent value for <release> on each puppet-opendaylight branch).
140
141 The default rpm_repo param in manafests/params.pp and rspec-puppet
142 unit/acceptance tests throughout the repo also need to be updated. They track
143 the latest CD pipelines, so they need to be updated when new branches are cut
144 and CD repos initiated.
145
146 Updating Ansible
147 ----------------
148
149 The default vars in vars/main.yml need to be updated for each major release and
150 SR. Grep around to find the places to update.
151
152 New example playbooks in the ansible-opendaylight/examples directory need to be
153 added for each new branch-cutting/CD pipeline and major release.
154
155     rpm_<new devel branch major version>_devel.yml
156
157     rpm_<just-released major version>_release.yml
158
159 Also update the playbook used in test-ansible-rpm script for each new CD repo.
160
161 https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=blob;f=jjb/packaging/test-ansible-rpm.sh