]> source.dussan.org Git - sonar-scanner-cli.git/commitdiff
Enable Mend scan
authorJulien HENRY <julien.henry@sonarsource.com>
Mon, 13 May 2024 09:40:25 +0000 (11:40 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Tue, 21 May 2024 10:25:39 +0000 (12:25 +0200)
.cirrus.yml
wss-unified-agent.config [new file with mode: 0644]

index 0405791848a8e0301bf1fc78c3d4773a66884a5f..a70cce5454bef8b7dc2aeb0fa0748a7a0d6d97f4 100644 (file)
@@ -43,7 +43,7 @@ ec2_instance: &EC2_INSTANCE_WINDOWS
   platform: windows
 
 only_sonarsource_qa: &ONLY_SONARSOURCE_QA
-  only_if: $CIRRUS_USER_COLLABORATOR == 'true' && ($CIRRUS_PR != "" || $CIRRUS_BRANCH == "master" || $CIRRUS_BRANCH =~ "branch-.*" || $CIRRUS_BRANCH =~ "dogfood-on-.*")
+  only_if: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_TAG == "" && ($CIRRUS_PR != "" || $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_BRANCH =~ "branch-.*" || $CIRRUS_BUILD_SOURCE == 'api' )
 
 except_nightly_cron: &EXCEPT_ON_NIGHTLY_CRON
   only_if: $CIRRUS_CRON != $NIGHTLY_CRON
@@ -52,6 +52,7 @@ except_nightly_cron: &EXCEPT_ON_NIGHTLY_CRON
 # TASKS
 #
 build_task:
+  <<: *ONLY_SONARSOURCE_QA
   eks_container:
     <<: *EKS_CONTAINER
   env:
@@ -67,6 +68,30 @@ build_task:
   cleanup_before_cache_script:
     - cleanup_maven_repository
 
+mend_scan_task:
+  depends_on:
+    - build
+  eks_container:
+    <<: *EKS_CONTAINER
+    cpu: 2
+    memory: 2G
+  # run only on master and long-term branches
+  only_if: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_TAG == "" && ($CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_BRANCH =~ "branch-.*")
+  env:
+    WS_APIKEY: VAULT[development/kv/data/mend data.apikey]
+  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 --batch-mode
+    - source ws_scan.sh
+  cleanup_before_cache_script: cleanup_maven_repository
+  allow_failures: "true"
+  always:
+    ws_artifacts:
+      path: "whitesource/**/*"
+
 linux_qa_java17_task:
   depends_on:
     - build
diff --git a/wss-unified-agent.config b/wss-unified-agent.config
new file mode 100644 (file)
index 0000000..f4c634a
--- /dev/null
@@ -0,0 +1,19 @@
+# Mend documentation https://docs.mend.io/bundle/unified_agent/page/unified_agent_configuration_parameters.html
+
+excludes=**/*sources.jar **/*javadoc.jar its/**
+fileSystemScan=False
+resolveAllDependencies=False
+
+maven.aggregateModules=True
+maven.downloadMissingDependencies=False
+maven.m2RepositoryPath=.m2/repository
+maven.resolveDependencies=True
+maven.runPreStep=False
+maven.ignoredScopes=provided,test,system
+
+wss.url=https://saas-eu.whitesourcesoftware.com/agent
+
+forceUpdate=true
+checkPolicies=true
+forceUpdate.failBuildOnPolicyViolation=true
+productName=Scanner/CLI