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

Published on 22 June 2020 in Administration / Version 4.8 - 2 minutes read - Last modified on 24 June 2020 - 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

23 June 2020
Monitoring Hue activity with Grafana Dashboards
Read More
22 June 2020
Automated checks for JavaScript modules compatible licenses and non absolute paths with Continuous Integration
Read More
19 May 2020
How to grant Ranger permissions for a new user on a Secure Cluster
Read More