Automated checks for JavaScript modules compatible licenses and non absolute paths with Continuous Integration

Published on 22 June 2020 in Version 4 / Development - 2 minutes read - Last modified on 19 April 2021 - Read in jp

Hi Interface Builders,

The investment in Continuous Integration (CI) and automation continues in order to help scale the resource and quality of the Hue project. This past year saw a lot of improvements with an integrated commit flow and adding series of link checking automatically run by Circle CI.

Here is the latest about how to automatically check that JavaScript artifacts have the correct licensing and do not contain absolute paths.

Licensing

Hue is an Apache 2 licensed project, making it easy to contribute back to or be incorporated into other projects. One caveat is that we should be careful to not bundle libraries not as permissive like the GPL or LGPL. In order not to miss it, a new check check-license validates that all the JavaScript modules are compatible:

npm run check-license

Which is then easily integrated into the Hue CI:

- run:
    name: run npm license checker
    command: |
      cd /usr/share/hue
      npm run check-license

ci npm license checker

Absolute paths

It is good practice to not ship any release artifact containing full file paths of the build machine. This helps guarantee that the artifacts are portable and do not leak unnessary information.

Hue already leverages the removeNPMAbsolutePaths script but somehow this one was missing paths introduced by Vue.js. A short additional check check-absolute-paths was recently added to take care of the issue.

npm run check-absolute-paths

And it was also added in the CI:

- run:
    name: run npm absolute path detection
    command: |
      cd /usr/share/hue
      npm run check-absolute-paths

And that's it, more development time is saved for later!

What is your favorite CI process? Any feedback? Feel free to comment here or on @gethue!

Johan & Romain from the Hue Team


comments powered by Disqus

More recent stories

03 May 2023
Discover the power of Apache Ozone using the Hue File Browser
Read More
23 January 2023
Hue 4.11 and its new dialects and features are out!
Read More