From 14f3b7bba24e23733907d7d9a9a033c5e84ff587 Mon Sep 17 00:00:00 2001 From: Edward Taupier Date: Thu, 2 May 2024 12:10:10 -0400 Subject: [PATCH] add scripts --- .gitignore | 1 + scripts/whitesource/agent.config | 38 ++++++++++++++++++++++++++++++++ scripts/whitesource/mend_scan.sh | 18 +++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 scripts/whitesource/agent.config create mode 100644 scripts/whitesource/mend_scan.sh diff --git a/.gitignore b/.gitignore index 8f994bd..001d28f 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ spec/reports test/tmp test/version_tmp tmp +.idea diff --git a/scripts/whitesource/agent.config b/scripts/whitesource/agent.config new file mode 100644 index 0000000..1f19b51 --- /dev/null +++ b/scripts/whitesource/agent.config @@ -0,0 +1,38 @@ +#skyux-spa Whitesource configuration file +#Whitesource Config File Documentation +#https://whitesource.atlassian.net/wiki/spaces/WD/pages/489160834/Unified+Agent+Configuration+File+Parameters +checkPolicies=false +forceCheckAllDependencies=false +forceUpdate=false +forceUpdate.failBuildOnPolicyViolation=false +offline=false +wss.url=https://app.whitesourcesoftware.com/agent +npm.resolveDependencies=true +npm.identifyByNameAndVersion=true +npm.runPreStep=false +npm.includeDevDependencies=true +bower.resolveDependencies=false +nuget.resolveDependencies=false +python.resolveDependencies=false +maven.resolveDependencies=false +gradle.resolveDependencies=false +paket.resolveDependencies=false +go.resolveDependencies=false +ruby.resolveDependencies=true +ruby.identifyByNameAndVersion=true +ruby.includeDevDependencies=true +ruby.runBundleInstall=true +sbt.resolveDependencies=false +php.resolveDependencies=false +html.resolveDependencies=true +html.identifyByNameAndVersion=true +html.includeDevDependencies=true +cocoapods.resolveDependencies=false +r.resolveDependencies=false +cargo.resolveDependencies=false +bazel.resolveDependencies=false +projectName=adminifi +productName=foundry +includes=**/*.js **/*.rb **/*.html **/*.html.erb +case.sensitive.glob=false +followSymbolicLinks=true diff --git a/scripts/whitesource/mend_scan.sh b/scripts/whitesource/mend_scan.sh new file mode 100644 index 0000000..16ed2a5 --- /dev/null +++ b/scripts/whitesource/mend_scan.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [[ -z "$WHITESOURCE_API_KEY" ]]; then + echo "WHITESOURCE_API_KEY has not been set, please set it up in the project environment variables since its mandatory" + exit 1 +fi + +echo apiKey="${WHITESOURCE_API_KEY}" >>scripts/whitesource/agent.config +echo scanComment="${BRANCH}-${GITHUB_RUN_ID}" >>scripts/whitesource/agent.config + +if [[ -f install_commands.sh ]]; then + echo "Executing file: install_commands.sh" + echo "" + chmod +x install_commands.sh + ./install_commands.sh +fi + +bash <(curl -s -L https://raw.githubusercontent.com/whitesource/unified-agent-distribution/master/standAlone/wss_agent_orb.sh) -apiKey "$WHITESOURCE_API_KEY" -c scripts/whitesource/agent.config -d .