Add Neon pkg unittests, remove wrong docs
[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 readthedocs 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 Adding Example Configuration Files
81 ----------------------------------
82
83 Add example configuration files for any new RPM repositories.
84
85 https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=tree;f=packages/rpm/example_repo_configs
86
87 As a change that depends on the repository configuration file change, add a
88 Packer variables file for the ODL version and CBS repository URL.
89
90 https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=tree;f=packer/vars
91
92 TODO: Document building/pushing VMs/containers after INTPAK-12 automation
93
94 Updating Tests for Release Events
95 ---------------------------------
96
97 Various release-related events require changes in packaging test coverage.
98
99 Tests need to be updated when:
100
101 * New releases or service releases are cut
102 * Old releases or service releases go End-of-Life (EOL)
103 * New branches are added
104 * Branches go EOL
105 * Old temporary autorelease, snapshot or multipatch builds expire (every 30-60
106   days)
107
108 Updating Unit Tests
109 +++++++++++++++++++
110
111 There are unit tests in Int/Pack that verify the Python build automation
112 scripts.
113
114 https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob;f=packages/test_lib.py
115
116 Update the unit tests by grepping around and copying examples.
117
118 Updating Functional Tests
119 +++++++++++++++++++++++++
120
121 There are functional tests in RelEng/Builder that build and test packages to
122 verify build jobs.
123
124 https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=tree;f=jjb/packaging
125
126 Update the functional tests by grepping around and copying examples. Make sure
127 to update both the test cases and the default parameters.
128
129 Updating Puppet
130 ---------------
131
132 The puppet-opendaylight Rakefile, which drives our functional Beaker tests,
133 needs to be updated when a new ODL major release comes out. It does not need to
134 be updated for SRs because it pulls the latest from the <release>-devel Nexus
135 repo (for a diffrent value for <release> on each puppet-opendaylight branch).
136
137 The default rpm_repo param in manafests/params.pp and rspec-puppet
138 unit/acceptance tests throughout the repo also need to be updated. They track
139 the latest CD pipelines, so they need to be updated when new branches are cut
140 and CD repos initiated.
141
142 Updating Ansible
143 ----------------
144
145 The default vars in vars/main.yml need to be updated for each major release and
146 SR. Grep around to find the places to update.
147
148 New example playbooks in the ansible-opendaylight/examples directory need to be
149 added for each new branch-cutting/CD pipeline and major release.
150
151     rpm_<new devel branch major version>_devel.yml
152
153     rpm_<just-released major version>_release.yml
154
155 Also update the playbook used in test-ansible-rpm script for each new CD repo.
156
157 https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=blob;f=jjb/packaging/test-ansible-rpm.sh