Skip to content

Commit

Permalink
Add whitesource scan to CI pipeline (#3638)
Browse files Browse the repository at this point in the history
  • Loading branch information
dorian-burihabwa-sonarsource authored Nov 15, 2021
1 parent f5bb39b commit 54b377c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,30 @@ build_task:
- ./check-license-compliance.sh
cleanup_before_cache_script: cleanup_maven_repository

ws_scan_task:
depends_on:
- build
<<: *ONLY_SONARSOURCE_QA
gke_container:
<<: *CONTAINER_DEFINITION
cpu: 4
memory: 8G
# run only on master and long-term branches
only_if: $CIRRUS_USER_COLLABORATOR == 'true' && ($CIRRUS_BRANCH == "master" || $CIRRUS_BRANCH =~ "branch-.*")
env:
WS_APIKEY: ENCRYPTED[cda363e6bcac3edd4c259dc05b3570e00152ad50f9ad3ec3cab72d57cda318a0d5472e37c656c3566c2cb8c752d2f5a0]
maven_cache:
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
whitesource_script:
- source cirrus-env QA
- source set_maven_build_version $BUILD_NUMBER
- mvn clean install -DskipTests -pl '!java-checks-test-sources'
- source ws_scan.sh
allow_failures: "true"
always:
ws_artifacts:
path: "whitesource/**/*"

qa_os_win_task:
depends_on:
- build
Expand Down Expand Up @@ -164,6 +188,7 @@ promote_task:
- ruling
- ruling_win
- plugin_qa
- ws_scan
<<: *ONLY_SONARSOURCE_QA
gke_container:
<<: *CONTAINER_DEFINITION
Expand Down
16 changes: 16 additions & 0 deletions wss-unified-agent.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
excludes=**/*sources.jar **/*javadoc.jar **/its/sources/** **/java-checks-test-sources/**
fileSystemScan=False
resolveAllDependencies=False

maven.aggregateModules=True
maven.downloadMissingDependencies=False
maven.ignoredScopes=None
maven.m2RepositoryPath=.m2/repository
maven.resolveDependencies=True
maven.runPreStep=False

wss.url=https://saas-eu.whitesourcesoftware.com/agent

forceUpdate=true
checkPolicies=true
forceUpdate.failBuildOnPolicyViolation=true

0 comments on commit 54b377c

Please sign in to comment.