-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adds automated license checking to our pipeline #1357
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good -- is it worth running on Jenkins/Travis as well, to avoid any sneaky --no-verify
s which could undermine it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with ben, we should pop this as a pipeline step :)
Not everyone has npm binaries aliased
@bbc/apache2-license-checker is currently a private package, despite the repo itself being open source: https://github.com/bbc/apache2-license-checker Have raised bbc/apache2-license-checker#11. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im generally not a fan of running npx
programatically, but LGTM :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
👍 |
Resolves N/A
Overall change: Adds apache2-license-checker to our pipeline to ensure we don't introduce dependencies that are incompatible with Apachev2.
Code changes:
apache2-license-checker
in the pre-push step so we can't push incompatible branches.Test notes
The
apache2-license-checker
should prevent us pushing if we add an Apache2-noncompliant dependency.First of all
git checkout -b testing-the-license-branch
. Then try removing, for example, this fromlicense-exceptions.json
:git commit -am "removed license exception - this commit should be fine"
.Now
git push origin testing-the-license-branch
and the license checker script should run and fail ("abab is not compliant with Apache2" or similar message).If you
git push origin testing-the-license-branch --no-verify
, it will force push (the--no-verify
skips the verification step). You should then see it fail in Jenkins.