Skip to content

Commit 91cb0e9

Browse files
committed
Enable Mend scan
1 parent 1d7e71a commit 91cb0e9

2 files changed

Lines changed: 46 additions & 2 deletions

File tree

.cirrus.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,19 @@ env:
2929
# RE-USABLE CONFIGS
3030
#
3131
container_definition: &CONTAINER_DEFINITION
32-
image: ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j17-latest
32+
image: ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j18-latest
3333
cluster_name: ${CIRRUS_CLUSTER_NAME}
3434
region: eu-central-1
3535
namespace: default
3636

3737
only_sonarsource_qa: &ONLY_SONARSOURCE_QA
38-
only_if: $CIRRUS_USER_COLLABORATOR == 'true' && ($CIRRUS_PR != "" || $CIRRUS_BRANCH == "master")
38+
only_if: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_TAG == "" && ($CIRRUS_PR != "" || $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_BRANCH =~ "branch-.*" || $CIRRUS_BUILD_SOURCE == 'api' )
3939

4040
#
4141
# TASKS
4242
#
4343
build_task:
44+
<<: *ONLY_SONARSOURCE_QA
4445
eks_container:
4546
<<: *CONTAINER_DEFINITION
4647
cpu: 2
@@ -58,6 +59,30 @@ build_task:
5859
cleanup_before_cache_script:
5960
- cleanup_maven_repository
6061

62+
mend_scan_task:
63+
depends_on:
64+
- build
65+
eks_container:
66+
<<: *CONTAINER_DEFINITION
67+
cpu: 2
68+
memory: 2G
69+
# run only on master and long-term branches
70+
only_if: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_TAG == "" && ($CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_BRANCH =~ "branch-.*")
71+
env:
72+
WS_APIKEY: VAULT[development/kv/data/mend data.apikey]
73+
maven_cache:
74+
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
75+
whitesource_script:
76+
- source cirrus-env QA
77+
- source set_maven_build_version $BUILD_NUMBER
78+
- mvn clean install -DskipTests --batch-mode
79+
- source ws_scan.sh
80+
cleanup_before_cache_script: cleanup_maven_repository
81+
allow_failures: "true"
82+
always:
83+
ws_artifacts:
84+
path: "whitesource/**/*"
85+
6186
qa_task:
6287
depends_on:
6388
- build

wss-unified-agent.config

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Mend documentation https://docs.mend.io/bundle/unified_agent/page/unified_agent_configuration_parameters.html
2+
3+
excludes=**/*sources.jar **/*javadoc.jar its/**
4+
fileSystemScan=False
5+
resolveAllDependencies=False
6+
7+
maven.aggregateModules=True
8+
maven.downloadMissingDependencies=False
9+
maven.m2RepositoryPath=.m2/repository
10+
maven.resolveDependencies=True
11+
maven.runPreStep=False
12+
maven.ignoredScopes=provided,test,system
13+
14+
wss.url=https://saas-eu.whitesourcesoftware.com/agent
15+
16+
forceUpdate=true
17+
checkPolicies=true
18+
forceUpdate.failBuildOnPolicyViolation=true
19+
productName=Scanner/JavaLibrary

0 commit comments

Comments
 (0)