This document provides details common project lead tasks, and, as creating a release is a big part of that, there is some overlap with the summary document Source Code release cycle.
An up to date ONIE DUE container should be used for Project Lead tasks. In addition to providing an environment with all needed tools, it assures that users building ONIE will be using exactly the same environment as the Project Lead, making it easier to track down build issues, and reducing support efforts as everyone can have a known working build environment.
cat onie-build-targets.json | jq '.'
This should print out all fields if there are no syntax errors.
Releases are a two step process
Note that the official quarterly release is mostly a copy of the last release candidate with the “release candidate” references removed, so save your work.
The candidate release note will be named with an -rcX For example:
2019.08-rc1.txt
While the official release will be named:
2019.08.txt
The contents of the two files will be identical except for the ‘rc’ in the text if nothing has changed in the month between publishing the release candidate, and publishing the release.
Start with the changelog diff from last release: Example:
git log --oneline 2022.02..HEAD
Then put changes (new platforms, bug fixes, etc, in the appropriate areas.) The entries don’t have to exactly match the commits, but should read clearly. If a new entry had subsequent updates (adding a README file, for example) that should just be considered to be part of the submission.
Release notes should have the following format, as shown in the release email that gets sent (a later step) https://ocp-all.groups.io/g/OCP-ONIE/message/255
The Git statistics are generated by using onie/contrib/git-stats/onie-git-stats to log differences between the last release and the HEAD Example:: onie/contrib/git-stats/onie-git-stats 2022.02..HEAD quarterly
Use the create-release script to publish a release:
onie/build-config/scripts/create-release $version $release_notes
Example:
onie/build-config/scripts/create-release 2022.08-rc1 ./<pathto>/2022.08-rc1.txt
Tip: You can test the create-release script on a private GitHub fork as the script will push to your fork. If the branch/tag goes bad before push clean up locally with something like:
git tag -d 2022.05-rc1
git branch -D 2022.05-rc1br
Send an update to the ONIE mailing list to let everyone know about the release candidate. OCP-ONIE@OCP-All.groups.io
This should show up in the mailing list archives shortly: https://ocp-all.groups.io/g/OCP-ONIE/topics
This is pretty much a copy of the release candidate steps with the “candidate” references removed, and the ONIE documentation gets updated.
Again, run this from inside a Debian 10 DUE container, as it will have the build environment and all of the documentation update tools.
Update the release notes as needed. This may be just as simple as renaming the “rc.txt” release notes for the release candidate and editing them to not have an rc suffix referenced.
This is mostly the release candidate, except without the “-rc” references
onie/build-config/scripts/create-release $version $release_notes
Example
./build-config/scripts/create-release 2022.08 ~/release-notes/2022.08.txt
Again, pretty much the same as the release candidate mail:
See the example here: https://ocp-all.groups.io/g/OCP-ONIE/message/248
Get the short link from here (two overlapping loops on the upper right side of the page), since that will be required to update the documentation. https://ocp-all.groups.io/g/OCP-ONIE/topics The link should look like:
https://ocp-all.groups.io/g/OCP-ONIE/message/248
This step only happens with the official quarterly release.
cd onie
git checkout docs
Note - if you get detached head errors here, you’ve probably got an existing directory. Nuking it a and a clean checkout handles this. Look for a more elegant solution next time.
Also note that the directory looks a lot different in docs. This is because the documentation consists of .rst files that get compiled to html and are stored in a gh-pages branch before being pushed to the web site as part of publish.
Sphinx is used to generate the documentation, and it comes in the ONIE DUE container. If you use a different version of Sphinx, expect a lot of file changes.
Update the following, adding the link to the release email from above where needed. Most of this should be just cut,paste, edit the date and the link, and adding a summary of changes. Follow the formatting from the last release.
So that’s a total of 3 files that always update for a release.
cd to top level onie directory
make docs
You should see a message about getting upstream Guzzle Sphinx theme, and it should end with the location of the generated html under ./build
Make sure things aren’t radically different. Note that you should only see about 3 files modified here.
Example:
modified: docs/developers/release.rst modified: docs/index.rst modified: docs/news/index.rst
A slew of changes indicates a problem OR a new version of Sphinx. If you upgraded Sphinx, then that’s fine. Otherwise, panic.
Git commit the change to the docs branch with an appropriate message, and a Signed-off-by
Example:
Updated home page news for 2020.11 release. Signed-off-by: Alex Doyle <adoyle@nvidia.com>
git push
Now the base docs branch is updated, time to do the html:
make publish
This generates html off the docs code committed in step 8 above, and the html code will need to be pushed. Make sure things look sane. If you see a ton of files and deletions, you’ve probably got the wrong version of Sphinx.
A probably sane example:
modified: _sources/developers/release.rst.txt
modified: _sources/index.rst.txt
modified: _sources/news/index.rst.txt
modified: developers/release.html
modified: index.html
modified: news/index.html
modified: objects.inv
modified: searchindex.js
NOTE: going to the Debian 9 container used a 1.7.9 version of Sphinx vs the 1.6.7 in Ubuntu 18 (used for the last few releases as the 1.2.? on marvel-07 failed hard.) This caused a number of files to be generated differently and added a new one - what should have been the 4 files changed was closer to 30. I had to cd to /tmp/onie-docs and add a new file to the commit in the gh-pages branch. This was manually doing the steps in onie/scripts/publish-docs
…And you’re done