-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add go license check to CI #1249
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
.github/ISSUE_TEMPLATE/third_party_license_usage_request.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: 3rd Party License Usage Request | ||
title: "[3rd Party License Usage Request]: " | ||
description: File a request for usage of a 3rd party license in the SOCI project. | ||
labels: "license-request" | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to fill out this request! The SOCI project adheres to the guidance set forth by | ||
Amazon Open Source Usage policies and [CNCF Allowlist License Policy](https://github.com/cncf/foundation/blob/88f1a47550eb2df71b4b6e9c148a1c2f99a1d92e/allowed-third-party-license-policy.md) (with the exception of MPL-2.0). | ||
|
||
- type: textarea | ||
id: license-request | ||
attributes: | ||
label: License usage request | ||
value: | | ||
Dependency: <link to dependency> | ||
License: <link to license> | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: use-case | ||
attributes: | ||
label: Use case | ||
description: | | ||
Briefly describe the use case the dependency would resolve. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: alternative-solutions | ||
attributes: | ||
label: Alternative solutions considered |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ set -eux -o pipefail | |
./check-flatc.sh | ||
./check-ltag.sh | ||
./check-lint.sh | ||
./check-third-party-licenses.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You | ||
# may not use this file except in compliance with the License. A copy of | ||
# the License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "license" file accompanying this file. This file is | ||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
# ANY KIND, either express or implied. See the License for the specific | ||
# language governing permissions and limitations under the License. | ||
|
||
set -euo pipefail | ||
|
||
# Normalize to working directory being root (up one level from ./scripts) | ||
root=$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd ) | ||
|
||
pushd "${root}" | ||
|
||
# Fail third party dependency usage if not covered by the curated set of pre-approved licenses. | ||
# | ||
# List was generated from guidance set forth by Amazon open source usage policies. | ||
# | ||
# The SOCI project, with the exception of its usage of MPL-2.0, additionally follows the guidance | ||
# set forth by the CNCF Allowlist License Policy. | ||
# | ||
# https://github.com/cncf/foundation/blob/88f1a47550eb2df71b4b6e9c148a1c2f99a1d92e/allowed-third-party-license-policy.md | ||
# | ||
# Additional usage of third party dependencies not covered by the following licenses | ||
# will need maintainer approval in alignment with Amazon open source usage policies. | ||
# | ||
# Requests can be made via https://github.com/awslabs/soci-snapshotter/issues/new/choose | ||
go-licenses check \ | ||
--include_tests \ | ||
--ignore github.com/awslabs/soci-snapshotter \ | ||
--allowed_licenses=Apache-2.0,BSD-2-Clause,BSD-2-Clause-FreeBSD,BSD-3-Clause,MIT,ISC,Python-2.0,PostgreSQL,X11,Zlib,MPL-2.0 ./... | ||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ set -eux -o pipefail | |
|
||
go install github.com/kunalkushwaha/[email protected] | ||
go install github.com/vbatts/[email protected] | ||
go install github.com/google/[email protected] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should this be consistent with our other SOCI scripts? i.e. should the copyright be to Soci Snapshotter Authors instead of Amazon?
Otherwise LGTM