tripleo-ui/docs/packaging.rst

3.0 KiB

TripleO UI packaging

TL;DR

  • We need people from the RDO team to approve all changes
  • New packages are built on every upstream merge commit
  • Use npm shrinkwrap when updating dependencies in package.json

Upstream

For upstream releases, we only provide a source tarball. This is released via the project-config machinery just like other TripleO projects. The tarball is produced by running npm pack in the root of the project, and excludes the node_modules directory. The tarballs are available here.

RDO

The upstream TripleO CI relies on packages provided by the RDO project. Therefore, it's important to keep the RDO packages up-to-date, and to prevent the builds from failing.

The product of RDO packaging is a set of two RPMs:

And of course, the second one depends on the first one. The -deps package contains the contents of the node_modules directory.

An RPM is created from a .spec file. These files can be access via the above GitHub links. Any changes to the files are subject to review by the RDO team. This can be a lengthy process because software licenses need to be reviewed.

RDO builds packages in two different streams: trunk and stable. Study the following graphic to understand how code flows through the pipeline:

RDO diagram

What to do when dependencies change

This applies both to adding new dependencies, and upgrading existing ones.

  1. Make the required changes in package.json
  2. $ rm -rf node_modules
  3. $ npm cache clean
  4. $ npm install
  5. $ npm shrinkwrap
  6. Commit those changes along with your dependency changes in tripleo-ui. In the commit message, add a link to the dependency (GitHub or similar), and indicate the project's license.
  7. When you submit the patch, the native npm jobs will pass but the undercloud gate job will fail because the dependency isn't yet in the openstack-tripleo-ui-deps package. This is expected. Have the patch be normally reviewed.
  8. Once it's about ready to merge, ask RDO to review the licensing.
  9. Update the openstack-tripleo-ui-deps package. Currently, this is done by submitting a pull request on GitHub. There are plans in place to move the workflow for this repository to the gerrit system.
  10. (Once per release) Update the openstack-tripleo-ui spec so that it points to the new version of openstack-tripleo-ui-deps. This is done by submitting a patch via gerrit.
  11. Recheck the patch. All jobs now pass.