Merge "Add release job of VFC"
[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: 240
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       cov-int/BUILD.metrics.xml
49       cov-int/build-log.txt
50       cov-int/build-timings.txt
51       cov-int/cov-import-scm-timings.txt
52       cov-int/failed_jsp/*
53       cov-int/java-security-da-input.dat
54       cov-int/java-security-da-whitelist.dat
55       cov-int/jsp-compilation-log.txt
56       cov-int/jsp-debug-log.txt
57       cov-int/security.log
58       coverity-scan-analysed-files.log
59
60     properties:
61       - lf-infra-properties:
62           build-days-to-keep: '{build-days-to-keep}'
63
64     parameters:
65       - lf-infra-parameters:
66           project: '{project}'
67           branch: '{branch}'
68           stream: '{stream}'
69       - lf-infra-maven-parameters:
70           mvn-opts: '{mvn-opts}'
71           mvn-params: '{mvn-params}'
72           mvn-version: '{mvn-version}'
73       - string:
74           name: ARCHIVE_ARTIFACTS
75           default: '{archive-artifacts}'
76           description: Artifacts to archive to the logs server.
77
78     triggers:
79       - timed: '{obj:cron}'
80
81     wrappers:
82       - lf-infra-wrappers:
83           build-timeout: '{build-timeout}'
84           jenkins-ssh-credential: '{jenkins-ssh-credential}'
85
86     builders:
87       - lf-infra-pre-build
88       - lf-maven-install:
89           mvn-version: '{mvn-version}'
90       - lf-update-java-alternatives:
91           java-version: '{java-version}'
92       - lf-provide-maven-settings:
93           global-settings-file: global-settings
94           settings-file: '{mvn-settings}'
95       - inject:
96           properties-content: |
97             COVERITY_PROJECT_NAME={coverity-project-name}
98             COVERITY_TOKEN={coverity-token}
99             COVERITY_USER_EMAIL={coverity-user-email}
100             SEARCH_PATHS={coverity-search-paths}
101             SEARCH_EXCLUDE_REGEXS={coverity-search-exclude-regexs}
102       - shell: !include-raw-escape:
103           - ../../global-jjb/shell/common-variables.sh
104           - ../../shell/maven-coverity.sh
105       - lf-provide-maven-settings-cleanup
106
107     publishers:
108       - lf-infra-publish
109
110     scm:
111       - lf-infra-gerrit-scm:
112           jenkins-ssh-credential: '{jenkins-ssh-credential}'
113           git-url: '{git-url}'
114           refspec: $GERRIT_REFSPEC
115           branch: $GERRIT_BRANCH
116           submodule-recursive: '{submodule-recursive}'
117           submodule-timeout: '{submodule-timeout}'
118           submodule-disable: '{submodule-disable}'
119           choosing-strategy: default