blob: 2c40bce733037277fbd42a56c754726772c77cbd [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 Khalasi02cd79c2018-04-30 15:05:09 -070073 - 'cord-infra-sonarqube'
Zack Williams0822a132018-04-11 14:44:35 -070074
75# run Sonarqube as a verification jobs on individual patchsets
76- job-template:
77 id: verify-sonarqube
78 name: 'verify_{project}_sonarqube'
79 description: |
80 Created by verify-sonarqube job-template from ci-management/jjb/sonar.yaml
81
82 triggers:
83 - cord-infra-gerrit-trigger-patchset:
84 gerrit-server-name: '{gerrit-server-name}'
85 project-regexp: '^{project}$'
86 branch-regexp: '{branch-regexp}'
87 dependency-jobs: '{dependency-jobs}'
88 file-include-regexp: '{all-files-regexp}'
89
90 properties:
91 - cord-infra-properties:
92 build-days-to-keep: '{build-days-to-keep}'
93 artifact-num-to-keep: '{artifact-num-to-keep}'
94
95 wrappers:
96 - lf-infra-wrappers:
97 build-timeout: '{build-timeout}'
98 jenkins-ssh-credential: '{jenkins-ssh-credential}'
99
100 scm:
101 - lf-infra-gerrit-scm:
102 git-url: '$GIT_URL/$GERRIT_PROJECT'
103 refspec: '$GERRIT_REFSPEC'
104 branch: '$GERRIT_BRANCH'
105 submodule-recursive: 'false'
106 choosing-strategy: gerrit
107 jenkins-ssh-credential: '{jenkins-ssh-credential}'
108
Zack Williams2c597f72018-04-16 12:27:41 -0700109 node: 'ubuntu16.04-basebuild-1c-2g'
Zack Williams0822a132018-04-11 14:44:35 -0700110 project-type: freestyle
111 concurrent: true
112
Zack Williamsbd8f3662018-04-30 12:27:03 -0700113# run `pylint --version` before sonarqube, to expose version in logs and to
114# avoid a timeout when sonarqube runs it during analysis.
Zack Williams0822a132018-04-11 14:44:35 -0700115 builders:
Kailash Khalasi02cd79c2018-04-30 15:05:09 -0700116 - 'cord-infra-sonarqube'