Merge "Migrate to gerrit-maven-stage (MSB)"
[ci-management.git] / jjb / ci-management / ci-management-coverity.yaml
1 ---
2 # Coverity Scan static analysis
3
4 - job-template:
5     name: '{project-name}-coverity'
6     id: onap-gerrit-maven-coverity
7     description: >
8       <hr/>
9       <h2>How to access Coverity Scan static analysis results</h2>
10       <ol>
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:
14           <ol>
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>
18           </ol>
19         <li>Click on <a href="https://scan.coverity.com/projects/{coverity-project-name}/view_defects">
20           View Defects</a>.</li>
21       </ol>
22       <p>Please note that processing data takes some time. You will get an email when it's done.</p>
23       <hr/>
24
25     project-type: freestyle
26     node: '{build-node}'
27     branch: master
28     build-days-to-keep: 7
29     build-timeout: 60
30     cron: '@daily'
31     disabled: false
32     git-url: '$GIT_URL/$PROJECT'
33     java-version: openjdk8
34     mvn-global-settings: global-settings
35     mvn-opts: ''
36     mvn-params: ''
37     mvn-version: mvn35
38     coverity-project-name: ''
39     coverity-token: ''
40     coverity-user-email: ''
41     coverity-search-paths: ''
42     coverity-search-exclude-regexs: ''
43     stream: master
44     submodule-recursive: true
45     submodule-timeout: 10
46     submodule-disable: false
47     archive-artifacts: >
48       **/*.log
49       **/*-log.txt
50       **/hs_err_*.log
51       **/target/**/feature.xml
52       **/target/failsafe-reports/failsafe-summary.xml
53       **/target/surefire-reports/*-output.txt
54       **/cov-int/BUILD.metrics.xml
55       **/cov-int/build-timings.txt
56       **/cov-int/java-security-da-whitelist.dat
57
58     properties:
59       - lf-infra-properties:
60           build-days-to-keep: '{build-days-to-keep}'
61
62     parameters:
63       - lf-infra-parameters:
64           project: '{project}'
65           branch: '{branch}'
66           stream: '{stream}'
67       - lf-infra-maven-parameters:
68           mvn-opts: '{mvn-opts}'
69           mvn-params: '{mvn-params}'
70           mvn-version: '{mvn-version}'
71       - string:
72           name: ARCHIVE_ARTIFACTS
73           default: '{archive-artifacts}'
74           description: Artifacts to archive to the logs server.
75
76     triggers:
77       - timed: '{obj:cron}'
78
79     wrappers:
80       - lf-infra-wrappers:
81           build-timeout: '{build-timeout}'
82           jenkins-ssh-credential: '{jenkins-ssh-credential}'
83
84     builders:
85       - lf-infra-pre-build
86       - lf-maven-install:
87           mvn-version: '{mvn-version}'
88       - lf-update-java-alternatives:
89           java-version: '{java-version}'
90       - lf-provide-maven-settings:
91           global-settings-file: global-settings
92           settings-file: '{mvn-settings}'
93       - inject:
94           properties-content: |
95             COVERITY_PROJECT_NAME={coverity-project-name}
96             COVERITY_TOKEN={coverity-token}
97             COVERITY_USER_EMAIL={coverity-user-email}
98             SEARCH_PATHS={coverity-search-paths}
99             SEARCH_EXCLUDE_REGEXS={coverity-search-exclude-regexs}
100       - shell: !include-raw-escape:
101           - ../../global-jjb/shell/common-variables.sh
102           - ../../shell/maven-coverity.sh
103       - lf-provide-maven-settings-cleanup
104
105     publishers:
106       - lf-infra-publish
107
108     scm:
109       - lf-infra-gerrit-scm:
110           jenkins-ssh-credential: '{jenkins-ssh-credential}'
111           git-url: '{git-url}'
112           refspec: $GERRIT_REFSPEC
113           branch: $GERRIT_BRANCH
114           submodule-recursive: '{submodule-recursive}'
115           submodule-timeout: '{submodule-timeout}'
116           submodule-disable: '{submodule-disable}'
117           choosing-strategy: default