Merge "Update global-jjb to v0.38.3"
[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     stream: master
42     submodule-recursive: true
43     submodule-timeout: 10
44     submodule-disable: false
45     archive-artifacts: >
46       **/*.log
47       **/hs_err_*.log
48       **/target/**/feature.xml
49       **/target/failsafe-reports/failsafe-summary.xml
50       **/target/surefire-reports/*-output.txt
51
52     properties:
53       - lf-infra-properties:
54           build-days-to-keep: '{build-days-to-keep}'
55
56     parameters:
57       - lf-infra-parameters:
58           project: '{project}'
59           branch: '{branch}'
60           stream: '{stream}'
61       - lf-infra-maven-parameters:
62           mvn-opts: '{mvn-opts}'
63           mvn-params: '{mvn-params}'
64           mvn-version: '{mvn-version}'
65       - string:
66           name: ARCHIVE_ARTIFACTS
67           default: '{archive-artifacts}'
68           description: Artifacts to archive to the logs server.
69
70     triggers:
71       - timed: '{obj:cron}'
72
73     wrappers:
74       - lf-infra-wrappers:
75           build-timeout: '{build-timeout}'
76           jenkins-ssh-credential: '{jenkins-ssh-credential}'
77
78     builders:
79       - lf-infra-pre-build
80       - lf-maven-install:
81           mvn-version: '{mvn-version}'
82       - lf-update-java-alternatives:
83           java-version: '{java-version}'
84       - lf-provide-maven-settings:
85           global-settings-file: global-settings
86           settings-file: '{mvn-settings}'
87       - inject:
88           properties-content: |
89             COVERITY_PROJECT_NAME={coverity-project-name}
90             COVERITY_TOKEN={coverity-token}
91             COVERITY_USER_EMAIL={coverity-user-email}
92       - shell: !include-raw-escape:
93           - ../../global-jjb/shell/common-variables.sh
94           - ../../shell/maven-coverity.sh
95       - lf-provide-maven-settings-cleanup
96
97     publishers:
98       - lf-infra-publish
99
100     scm:
101       - lf-infra-gerrit-scm:
102           jenkins-ssh-credential: '{jenkins-ssh-credential}'
103           git-url: '{git-url}'
104           refspec: $GERRIT_REFSPEC
105           branch: $GERRIT_BRANCH
106           submodule-recursive: '{submodule-recursive}'
107           submodule-timeout: '{submodule-timeout}'
108           submodule-disable: '{submodule-disable}'
109           choosing-strategy: default