blob: 8173268a994cc6d17f6160276895ad5ca5249d80 [file] [log] [blame]
Zack Williams0822a132018-04-11 14:44:35 -07001---
2# Sonarqube coverage tests
3#
4# There are two kinds of tests:
5#
6# - coverage_{project}_sonarqube - run after merge to give an idea of ongoing code health
7# - verify_{project}_sonarqube - run on patchsets, invoked in the verify/*.yaml
8#
9# JJB module docs:
10# https://docs.openstack.org/infra/jenkins-job-builder/builders.html?highlight=sonar#builders.sonar
11#
12# Sonarqube docs:
13# https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Jenkins
14# https://docs.sonarqube.org/display/SCAN/Advanced+SonarQube+Scanner+Usages
15
16- project:
17 name: 'sonarqube-ongoing-coverage'
18
19 jobs:
20 - 'sonarqube-coverage':
21 branch-regexp: '{supported-branches-regexp}'
22 project:
23 - 'cord'
Zack Williams2c597f72018-04-16 12:27:41 -070024 - 'ecord'
Zack Williams0822a132018-04-11 14:44:35 -070025 - 'maas'
Zack Williams2c597f72018-04-16 12:27:41 -070026 - 'mcord'
Zack Williams0822a132018-04-11 14:44:35 -070027 - 'platform-install'
Zack Williams2c597f72018-04-16 12:27:41 -070028 - 'rcord'
Zack Williams0822a132018-04-11 14:44:35 -070029 - 'xos'
Zack Williams2c597f72018-04-16 12:27:41 -070030 - 'xos-gui'
Zack Williams0822a132018-04-11 14:44:35 -070031
32# run ongoing coverage tests on merged patchsets
33- job-template:
34 id: sonarqube-coverage
35 name: 'coverage_{project}_sonarqube'
36 description: |
37 Created by sonarqube-coverage job-template from ci-management/jjb/sonar.yaml
38
39 triggers:
40 - cord-infra-gerrit-trigger-merge:
41 gerrit-server-name: '{gerrit-server-name}'
42 project-regexp: '^{project}$'
43 branch-regexp: '{branch-regexp}'
44 dependency-jobs: '{dependency-jobs}'
45 file-include-regexp: '{all-files-regexp}'
46
47 properties:
48 - cord-infra-properties:
49 build-days-to-keep: '{build-days-to-keep}'
50 artifact-num-to-keep: '{artifact-num-to-keep}'
51
52 wrappers:
53 - lf-infra-wrappers:
54 build-timeout: '{build-timeout}'
55 jenkins-ssh-credential: '{jenkins-ssh-credential}'
56
57 scm:
58 - lf-infra-gerrit-scm:
59 git-url: '$GIT_URL/$GERRIT_PROJECT'
60 refspec: '$GERRIT_REFSPEC'
61 branch: '$GERRIT_BRANCH'
62 submodule-recursive: 'false'
63 choosing-strategy: gerrit
64 jenkins-ssh-credential: '{jenkins-ssh-credential}'
65
Zack Williams2c597f72018-04-16 12:27:41 -070066 node: 'ubuntu16.04-basebuild-1c-2g'
Zack Williams0822a132018-04-11 14:44:35 -070067 project-type: freestyle
68 concurrent: true
69
Zack Williamsbd8f3662018-04-30 12:27:03 -070070# run `pylint --version` before sonarqube, to expose version in logs and to
71# avoid a timeout when sonarqube runs it during analysis.
Zack Williams0822a132018-04-11 14:44:35 -070072 builders:
Kailash Khalasibfeee692018-05-01 14:15:04 -070073 - 'cord-infra-sonarqube':
74 project: '{project}'
Zack Williams0822a132018-04-11 14:44:35 -070075
76# run Sonarqube as a verification jobs on individual patchsets
77- job-template:
78 id: verify-sonarqube
79 name: 'verify_{project}_sonarqube'
80 description: |
81 Created by verify-sonarqube job-template from ci-management/jjb/sonar.yaml
82
83 triggers:
84 - cord-infra-gerrit-trigger-patchset:
85 gerrit-server-name: '{gerrit-server-name}'
86 project-regexp: '^{project}$'
87 branch-regexp: '{branch-regexp}'
88 dependency-jobs: '{dependency-jobs}'
89 file-include-regexp: '{all-files-regexp}'
90
91 properties:
92 - cord-infra-properties:
93 build-days-to-keep: '{build-days-to-keep}'
94 artifact-num-to-keep: '{artifact-num-to-keep}'
95
96 wrappers:
97 - lf-infra-wrappers:
98 build-timeout: '{build-timeout}'
99 jenkins-ssh-credential: '{jenkins-ssh-credential}'
100
101 scm:
102 - lf-infra-gerrit-scm:
103 git-url: '$GIT_URL/$GERRIT_PROJECT'
104 refspec: '$GERRIT_REFSPEC'
105 branch: '$GERRIT_BRANCH'
106 submodule-recursive: 'false'
107 choosing-strategy: gerrit
108 jenkins-ssh-credential: '{jenkins-ssh-credential}'
109
Zack Williams2c597f72018-04-16 12:27:41 -0700110 node: 'ubuntu16.04-basebuild-1c-2g'
Zack Williams0822a132018-04-11 14:44:35 -0700111 project-type: freestyle
112 concurrent: true
113
Zack Williamsbd8f3662018-04-30 12:27:03 -0700114# run `pylint --version` before sonarqube, to expose version in logs and to
115# avoid a timeout when sonarqube runs it during analysis.
Zack Williams0822a132018-04-11 14:44:35 -0700116 builders:
Kailash Khalasibfeee692018-05-01 14:15:04 -0700117 - 'cord-infra-sonarqube':
118 project: '{project}'