| --- |
| # Sonarqube coverage tests |
| # |
| # There are two kinds of tests: |
| # |
| # - coverage_{project}_sonarqube - run after merge to give an idea of ongoing code health |
| # - verify_{project}_sonarqube - run on patchsets, invoked in the verify/*.yaml |
| # |
| # JJB module docs: |
| # https://docs.openstack.org/infra/jenkins-job-builder/builders.html?highlight=sonar#builders.sonar |
| # |
| # Sonarqube docs: |
| # https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Jenkins |
| # https://docs.sonarqube.org/display/SCAN/Advanced+SonarQube+Scanner+Usages |
| |
| - project: |
| name: 'sonarqube-ongoing-coverage' |
| |
| jobs: |
| - 'sonarqube-coverage': |
| branch-regexp: '{supported-branches-regexp}' |
| project: |
| - 'cord' |
| - 'ecord' |
| - 'maas' |
| - 'mcord' |
| - 'platform-install' |
| - 'rcord' |
| - 'xos' |
| - 'xos-gui' |
| |
| # run ongoing coverage tests on merged patchsets |
| - job-template: |
| id: sonarqube-coverage |
| name: 'coverage_{project}_sonarqube' |
| description: | |
| Created by sonarqube-coverage job-template from ci-management/jjb/sonar.yaml |
| |
| triggers: |
| - cord-infra-gerrit-trigger-merge: |
| gerrit-server-name: '{gerrit-server-name}' |
| project-regexp: '^{project}$' |
| branch-regexp: '{branch-regexp}' |
| dependency-jobs: '{dependency-jobs}' |
| file-include-regexp: '{all-files-regexp}' |
| |
| properties: |
| - cord-infra-properties: |
| build-days-to-keep: '{build-days-to-keep}' |
| artifact-num-to-keep: '{artifact-num-to-keep}' |
| |
| wrappers: |
| - lf-infra-wrappers: |
| build-timeout: '{build-timeout}' |
| jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| |
| scm: |
| - lf-infra-gerrit-scm: |
| git-url: '$GIT_URL/$GERRIT_PROJECT' |
| refspec: '$GERRIT_REFSPEC' |
| branch: '$GERRIT_BRANCH' |
| submodule-recursive: 'false' |
| choosing-strategy: gerrit |
| jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| |
| node: 'ubuntu16.04-basebuild-1c-2g' |
| project-type: freestyle |
| concurrent: true |
| |
| # run `pylint --version` before sonarqube, to expose version in logs and to |
| # avoid a timeout when sonarqube runs it during analysis. |
| builders: |
| - 'cord-infra-sonarqube': |
| project: '{project}' |
| |
| # run Sonarqube as a verification jobs on individual patchsets |
| - job-template: |
| id: verify-sonarqube |
| name: 'verify_{project}_sonarqube' |
| description: | |
| Created by verify-sonarqube job-template from ci-management/jjb/sonar.yaml |
| |
| triggers: |
| - cord-infra-gerrit-trigger-patchset: |
| gerrit-server-name: '{gerrit-server-name}' |
| project-regexp: '^{project}$' |
| branch-regexp: '{branch-regexp}' |
| dependency-jobs: '{dependency-jobs}' |
| file-include-regexp: '{all-files-regexp}' |
| |
| properties: |
| - cord-infra-properties: |
| build-days-to-keep: '{build-days-to-keep}' |
| artifact-num-to-keep: '{artifact-num-to-keep}' |
| |
| wrappers: |
| - lf-infra-wrappers: |
| build-timeout: '{build-timeout}' |
| jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| |
| scm: |
| - lf-infra-gerrit-scm: |
| git-url: '$GIT_URL/$GERRIT_PROJECT' |
| refspec: '$GERRIT_REFSPEC' |
| branch: '$GERRIT_BRANCH' |
| submodule-recursive: 'false' |
| choosing-strategy: gerrit |
| jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| |
| node: 'ubuntu16.04-basebuild-1c-2g' |
| project-type: freestyle |
| concurrent: true |
| |
| # run `pylint --version` before sonarqube, to expose version in logs and to |
| # avoid a timeout when sonarqube runs it during analysis. |
| builders: |
| - 'cord-infra-sonarqube': |
| project: '{project}' |