summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jjb/ci-management/ci-management-coverity.yaml6
-rw-r--r--shell/maven-coverity.sh22
2 files changed, 26 insertions, 2 deletions
diff --git a/jjb/ci-management/ci-management-coverity.yaml b/jjb/ci-management/ci-management-coverity.yaml
index ba37d5785..83bdffc30 100644
--- a/jjb/ci-management/ci-management-coverity.yaml
+++ b/jjb/ci-management/ci-management-coverity.yaml
@@ -38,18 +38,20 @@
coverity-project-name: ''
coverity-token: ''
coverity-user-email: ''
+ coverity-search-paths: ''
+ coverity-search-exclude-regexs: ''
stream: master
submodule-recursive: true
submodule-timeout: 10
submodule-disable: false
archive-artifacts: >
**/*.log
+ **/*-log.txt
**/hs_err_*.log
**/target/**/feature.xml
**/target/failsafe-reports/failsafe-summary.xml
**/target/surefire-reports/*-output.txt
**/cov-int/BUILD.metrics.xml
- **/cov-int/build-log.txt
**/cov-int/build-timings.txt
**/cov-int/java-security-da-whitelist.dat
@@ -93,6 +95,8 @@
COVERITY_PROJECT_NAME={coverity-project-name}
COVERITY_TOKEN={coverity-token}
COVERITY_USER_EMAIL={coverity-user-email}
+ SEARCH_PATHS={coverity-search-paths}
+ SEARCH_EXCLUDE_REGEXS={coverity-search-exclude-regexs}
- shell: !include-raw-escape:
- ../../global-jjb/shell/common-variables.sh
- ../../shell/maven-coverity.sh
diff --git a/shell/maven-coverity.sh b/shell/maven-coverity.sh
index 17601d441..22a42c2d5 100644
--- a/shell/maven-coverity.sh
+++ b/shell/maven-coverity.sh
@@ -20,6 +20,25 @@ PS4='+['$(readlink -f "$0")' ${FUNCNAME[0]%main}#$LINENO] '
echo '---> maven-coverity.sh'
#-----------------------------------------------------------------------------
+# Process parameters for JS/PHP/Ruby files analysis
+
+FS_CAPTURE_SEARCH_PARAMS=''
+if [ -n "${SEARCH_PATHS:=}" ]; then
+ for SEARCH_PATH in ${SEARCH_PATHS}; do
+ if [ -d "${SEARCH_PATH}" ]; then
+ FS_CAPTURE_SEARCH_PARAMS="${FS_CAPTURE_SEARCH_PARAMS} --fs-capture-search '${SEARCH_PATH}'"
+ else
+ echo "'${SEARCH_PATH}' from \$SEARCH_PATHS is not an existing directory." >&2
+ exit 1
+ fi
+ done
+fi
+
+for EXCLUDE_REGEX in ${SEARCH_EXCLUDE_REGEXS:=}; do
+ FS_CAPTURE_SEARCH_PARAMS="${FS_CAPTURE_SEARCH_PARAMS} --fs-capture-search-exclude-regex '${EXCLUDE_REGEX}'"
+done
+
+#-----------------------------------------------------------------------------
# Check if we are allowed to submit results to Coverity Scan service
# and have not exceeded our upload quota limits
# See also: https://scan.coverity.com/faq#frequency
@@ -96,8 +115,9 @@ rm 'coverity_tool.tgz'
export MAVEN_OPTS
-cov-build \
+eval cov-build \
--dir 'cov-int' \
+ ${FS_CAPTURE_SEARCH_PARAMS} \
"${MVN}" clean install \
--errors \
--global-settings "${GLOBAL_SETTINGS_FILE}" \