-
Notifications
You must be signed in to change notification settings - Fork 0
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
Th2 1836 license compliance for java projects #90
Closed
Nikita-Smirnov-Exactpro
wants to merge
63
commits into
TH2-4887-improve-performance-of-core-th-2-components-mstore-estore-lw-dp
from
TH2-1836-license-compliance-for-java-projects
Closed
Changes from 58 commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
5d9f9fd
[TH2-1836] added com.github.jk1.dependency-license-report plugin
Nikita-Smirnov-Exactpro d0989a6
[TH2-1836] added CsvCustomReportRenderer
Nikita-Smirnov-Exactpro cd66eb4
[TH2-1836] refactored
Nikita-Smirnov-Exactpro f152c69
initial attempt to run the script
sabamushtashvili 3f35432
added job to workflow
sabamushtashvili 03da193
changed path to script
sabamushtashvili a0aa05d
editing job
sabamushtashvili aeb2e3b
edited path
sabamushtashvili b8a47fe
added checkout action
sabamushtashvili 579cc84
specified branch
sabamushtashvili 97ed37f
added script locally?
sabamushtashvili 9690996
edited folder name
sabamushtashvili 939aa55
edited folder path
sabamushtashvili 6865278
checking root path
sabamushtashvili 12d8e24
checking repos
sabamushtashvili 02466a2
checking repos
sabamushtashvili 04153d3
checking repos
sabamushtashvili ae5709b
running script
sabamushtashvili b3a9a72
running script
sabamushtashvili 9a76999
made file executable
sabamushtashvili 070c08e
added checkout
sabamushtashvili 594a6e8
removed chmod
sabamushtashvili 3340340
modified script
sabamushtashvili eaebf2e
modified script
sabamushtashvili 5282755
edited script permissions
sabamushtashvili dc785c1
adding jq env
sabamushtashvili 79b52c0
adding jq env
sabamushtashvili 43902d8
updated script
sabamushtashvili 64d5b31
removed local script
sabamushtashvili a4f2845
cloning script repo
sabamushtashvili f3d4564
typo
sabamushtashvili 621de01
fixing paths
sabamushtashvili 0e7a659
downloading script
sabamushtashvili bd3642a
fix workflow
924af19
installing jq environment
sabamushtashvili b33d5ee
displaying results
sabamushtashvili 330472d
checking folders
sabamushtashvili 38b1f0d
corrected folder name
sabamushtashvili c90f019
uploading results
sabamushtashvili 31d735f
fixed extension
sabamushtashvili 4e0b2dd
fixing time
sabamushtashvili 28caa1d
added timestamp
sabamushtashvili e53f86d
removed time
sabamushtashvili 2e25bad
upload files fix
ce3e181
art upload
2f7818b
fix naming
57a1dab
add name and version
b663561
fix
a681442
fix typo
102cbe0
added condition
sabamushtashvili d101dba
updating workflow
sabamushtashvili 7e4e4c4
separating script run and output analyzes
sabamushtashvili ed24fef
checking failed_licenses file
sabamushtashvili bba36c3
editing step for setting the status
sabamushtashvili b2ef98c
separated licenses check to new workflow
sabamushtashvili 1fd8ed9
chenged workflow name
sabamushtashvili f6c08e5
chenged fail condition
sabamushtashvili 47ef63f
corrections to output messages
cf445ad
fix typo
0252ffa
fix quotes
1ee83b6
fix quotes
ccdc23a
output corrections
cbf9669
new version of workflow
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
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Check licenses | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
- version-* | ||
- dependabot** | ||
paths-ignore: | ||
- README.md | ||
|
||
env: | ||
APP_NAME: ${{ github.repository }} | ||
BRANCH: ${{ github.ref }} | ||
|
||
jobs: | ||
check_licenses: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout actions | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install jq env | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y jq | ||
|
||
- name: Download script | ||
run: | | ||
wget -q -O check_licenses.sh https://raw.githubusercontent.com/th2-net/.github/th2-1836-json-files-update/license-compliance/check_licenses.sh | ||
chmod +x ./check_licenses.sh | ||
|
||
- name: Run check_licenses script | ||
run: ./check_licenses.sh java | ||
id: run_script | ||
|
||
- name: Get version | ||
run: | ||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | ||
|
||
- name: Uploading results | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: licenses_check-$APP_NAME-$VERSION | ||
path: ./licenses_check/ | ||
|
||
- name: Determine workflow status | ||
id: set_status | ||
run: | | ||
line_count=$(wc -l < ./licenses_check/failed_licenses.csv) | ||
if [[ $line_count -gt 1 ]]; then | ||
echo "FAILED: failed/unknown licenses found" | ||
exit 1 | ||
else | ||
echo "PASSED: license check successfull" | ||
exit 0 | ||
fi | ||
|
||
- name: Set workflow status | ||
run: echo "::set-output name=status::Failure" | ||
if: steps.set_status.outputs.result == 'FAILED: failed/unknown licenses found' | ||
continue-on-error: false |
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
Oops, something went wrong.
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.
Could we create a template with main part of this script in the .github to simplify spreading to other repositories