2 # Coverity Scan static analysis
5 name: '{project-name}-coverity'
6 id: onap-gerrit-maven-coverity
9 <h2>How to access Coverity Scan static analysis results</h2>
11 <li>Visit <a href="https://scan.coverity.com/projects/{coverity-project-name}">Coverity Scan
12 project page</a>.</li>
13 <li>If you have not been added to the project on Coverity Scan service yet:
15 <li>Click on <a href="https://scan.coverity.com/memberships/new?project_id={coverity-project-name}">
16 Add me to project</a>.</li>
17 <li>Wait till the project administrators grant you appropriate permissions.</li>
19 <li>Click on <a href="https://scan.coverity.com/projects/{coverity-project-name}/view_defects">
20 View Defects</a>.</li>
22 <p>Please note that processing data takes some time. You will get an email when it's done.</p>
23 <p>See more <a href="https://wiki.onap.org/x/Y6vQAw">Coverity Scan HOWTOs</a> on ONAP Developer Wiki.</p>
26 project-type: freestyle
34 git-url: '$GIT_URL/$PROJECT'
35 java-version: openjdk8
36 mvn-global-settings: global-settings
40 coverity-project-name: ''
42 coverity-user-email: ''
43 coverity-search-paths: ''
44 coverity-search-exclude-regexs: ''
45 max-git-repo-age-hours: 0
47 submodule-recursive: true
49 submodule-disable: false
51 cov-int/BUILD.metrics.xml
53 cov-int/build-timings.txt
54 cov-int/cov-import-scm-timings.txt
55 cov-int/coverity-scan-analysed-files.txt
56 cov-int/scm-untracked-files.txt
58 cov-int/java-security-da-input.dat
59 cov-int/java-security-da-whitelist.dat
60 cov-int/jsp-compilation-log.txt
61 cov-int/jsp-debug-log.txt
65 - lf-infra-properties:
66 build-days-to-keep: '{build-days-to-keep}'
69 - lf-infra-parameters:
73 - lf-infra-maven-parameters:
74 mvn-opts: '{mvn-opts}'
75 mvn-params: '{mvn-params}'
76 mvn-version: '{mvn-version}'
78 name: ARCHIVE_ARTIFACTS
79 default: '{archive-artifacts}'
80 description: Artifacts to archive to the logs server.
83 default: '{coverity-search-paths}'
85 Additional directories to search for files to analyse by Coverity
86 Scan service (space separated).
88 name: SEARCH_EXCLUDE_REGEXS
89 default: '{coverity-search-exclude-regexs}'
91 File path patterns to exclude from analysis by Coverity Scan
92 service (e.g. 3rd-party or auto-generated sources, space
95 name: COVERITY_USER_EMAIL
96 default: '{coverity-user-email}'
98 E-mail address to receive analysis status report after submittion.
99 It must be a registered user on Coverity Scan service added as a
100 member to appropriate Coverity Scan project with "Maintainer/Owner"
105 description: Do not submit results to Coverity Scan server at the end of the build.
107 name: 'MAX_GIT_REPO_AGE_HOURS'
108 default: '{max-git-repo-age-hours}'
110 If set to non-zero run the code scan only if there were no git
111 repository commits last MAX_GIT_REPO_AGE_HOURS hours.
112 It makes sense to set the value twice the 'cron' interval for the
113 job (e.g. if 'cron: @daily', then MAX_GIT_REPO_AGE_HOURS=48)
116 - timed: '{obj:cron}'
120 build-timeout: '{build-timeout}'
121 jenkins-ssh-credential: '{jenkins-ssh-credential}'
126 mvn-version: '{mvn-version}'
127 - lf-update-java-alternatives:
128 java-version: '{java-version}'
129 - lf-provide-maven-settings:
130 global-settings-file: global-settings
131 settings-file: '{mvn-settings}'
133 properties-content: |
134 COVERITY_PROJECT_NAME={coverity-project-name}
135 COVERITY_TOKEN={coverity-token}
136 - shell: !include-raw-escape:
137 - ../../global-jjb/shell/common-variables.sh
138 - ../../shell/maven-coverity.sh
139 - lf-provide-maven-settings-cleanup
145 - lf-infra-gerrit-scm:
146 jenkins-ssh-credential: '{jenkins-ssh-credential}'
148 refspec: $GERRIT_REFSPEC
149 branch: $GERRIT_BRANCH
150 submodule-recursive: '{submodule-recursive}'
151 submodule-timeout: '{submodule-timeout}'
152 submodule-disable: '{submodule-disable}'
153 choosing-strategy: default