Skip to content

Add more repos to offline whitesource scan #1438

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

Merged
merged 2 commits into from
Jan 12, 2022

Conversation

zelinh
Copy link
Member

@zelinh zelinh commented Jan 8, 2022

Signed-off-by: Zelin Hao [email protected]

Description

Add performance-analyzer-rca and opensearch-build repos to the offline whitesource scan on Jenkins.
Fix some issues for temporarily creating settings.gradle which is needed for WhiteSource to run CVEs scan on repos that have that file missing.

Issues Resolved

[List any issues this PR will resolve]

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@zelinh zelinh requested a review from a team as a code owner January 8, 2022 00:54
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2022

Codecov Report

Merging #1438 (26adf5f) into main (84d8da0) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #1438   +/-   ##
=========================================
  Coverage     94.45%   94.45%           
  Complexity       11       11           
=========================================
  Files           140      140           
  Lines          3085     3085           
  Branches         10       10           
=========================================
  Hits           2914     2914           
  Misses          164      164           
  Partials          7        7           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 84d8da0...26adf5f. Read the comment docs.

@@ -23,7 +23,12 @@ set -e

# Generate temporary `settings.gradle` file based on the name in `build.gradle`
function generate_settings_gradle() {
settings_gradle_content=`cat build.gradle | grep name | grep -i $repo | head -n 1 | sed 's/name/rootProject.name =/g' | awk '{$1=$1};1'`
repo_name=$1
settings_gradle_content=`cat build.gradle | grep name | head -n 1 | grep -i ${repo_name:0:3} | sed 's/name/rootProject.name =/g' | awk '{$1=$1};1'`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After talking to @zelinh this grep grep -i ${repo_name:0:3} is purely to catch the name var in perftop repo.
Since perftop repo is using the name perf-top instead of perftop repo name in build.gradle.

The better way to solve this is to add settings.gradle to repositories that lack this file, so whitesource script does not need to put in temp fixes to run the scan.

@zelinh zelinh merged commit 3f74bc2 into opensearch-project:main Jan 12, 2022
@zelinh zelinh deleted the add-more-repos branch January 12, 2022 23:47
peterzhuamazon pushed a commit to peterzhuamazon/opensearch-build that referenced this pull request Feb 16, 2022
* Add more repos to offline scan

Signed-off-by: Zelin Hao <[email protected]>

* Simply the way we generate temp settings gradle

Signed-off-by: Zelin Hao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants