From f8fd3e4c54940e628d47995b4a561175c307a1c0 Mon Sep 17 00:00:00 2001 From: Artem Naluzhnyy Date: Sat, 17 Aug 2019 17:18:28 +0200 Subject: [PATCH] Make COVERITY_USER_EMAIL, SEARCH_PATHS, SEARCH_EXCLUDE_REGEXS configurable Now the Jenkins job parameters are configurable on the WEB since it's usefull for initial Coverity Scan job setup or tuning process. Issue-ID: CIMAN-260 Signed-off-by: Artem Naluzhnyy Change-Id: I6f2f59416966233c24c1b6bc1847d4ebe19a6985 --- jjb/ci-management/ci-management-coverity.yaml | 24 +++++++++++++++++++++--- shell/maven-coverity.sh | 7 +++++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/jjb/ci-management/ci-management-coverity.yaml b/jjb/ci-management/ci-management-coverity.yaml index c52559218..fadea8882 100644 --- a/jjb/ci-management/ci-management-coverity.yaml +++ b/jjb/ci-management/ci-management-coverity.yaml @@ -76,6 +76,27 @@ name: ARCHIVE_ARTIFACTS default: '{archive-artifacts}' description: Artifacts to archive to the logs server. + - string: + name: SEARCH_PATHS + default: '{coverity-search-paths}' + description: > + Additional directories to search for files to analyse by Coverity + Scan service (space separated). + - string: + name: SEARCH_EXCLUDE_REGEXS + default: '{coverity-search-exclude-regexs}' + description: > + File path patterns to exclude from analysis by Coverity Scan + service (e.g. 3rd-party or auto-generated sources, space + separated). + - string: + name: COVERITY_USER_EMAIL + default: '{coverity-user-email}' + description: > + E-mail address to receive analysis status report after submittion. + It must be a registered user on Coverity Scan service added as a + member to appropriate Coverity Scan project with "Maintainer/Owner" + role. - bool: name: DRY_RUN default: '{dry-run}' @@ -102,9 +123,6 @@ properties-content: | 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 e82de3dff..5db7f33e4 100644 --- a/shell/maven-coverity.sh +++ b/shell/maven-coverity.sh @@ -176,6 +176,13 @@ cov-manage-emit \ | sort \ > 'cov-int/scm-untracked-files.txt' +if [ -s 'cov-int/scm-untracked-files.txt' ]; then + echo '[WARNING] There are some files analysed but not tracked by SCM repository.' \ + 'There might be 3rd-party or auto-generated sources. See details in' \ + '"cov-int/scm-untracked-files.txt" file.' \ + >&2 +fi + #----------------------------------------------------------------------------- # Submit results to Coverity service -- 2.16.6