X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jjb%2Flf-c-cpp-jobs.yaml;h=2eb394eea474e1e4bafc04a92ed13ee31dbeb6a7;hb=7e66b111c22dec7fc341d593d33b74b4ca9d724b;hp=07e5ec4f2c66c72b4b6a76657409eaf553883c20;hpb=1a45fc8ab4c2022ce42400b769aaad302baefd8f;p=releng%2Fglobal-jjb.git diff --git a/jjb/lf-c-cpp-jobs.yaml b/jjb/lf-c-cpp-jobs.yaml index 07e5ec4f..2eb394ee 100644 --- a/jjb/lf-c-cpp-jobs.yaml +++ b/jjb/lf-c-cpp-jobs.yaml @@ -1,4 +1,136 @@ --- +############### +# CMAKE Sonar # +############### + +- lf_cmake_sonar: &lf_cmake_sonar + name: lf-cmake-sonar + + ###################### + # Default parameters # + ###################### + + branch: master + build-days-to-keep: 7 + build-dir: '$WORKSPACE/target' + build-timeout: 15 + cmake-opts: '' + cron: '@daily' + disable-job: false + git-url: '$GIT_URL/$PROJECT' + github-url: 'https://github.com' + install-prefix: '$BUILD_DIR/output' + make-opts: '' + pre-build: '' + sonar-scanner-version: 3.3.0.1492 + sonarcloud-api-token: '' + sonarcloud-organization: '' + sonarcloud-project-key: '' + submodule-recursive: true + submodule-timeout: 10 + + ##################### + # Job Configuration # + ##################### + + project-type: freestyle + node: '{build-node}' + disabled: '{disable-job}' + + properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - lf-infra-parameters: + project: '{project}' + branch: '{branch}' + stream: '{stream}' + lftools-version: '{lftools-version}' + - lf-cmake-parameters: + build-dir: '{build-dir}' + cmake-opts: '{cmake-opts}' + install-prefix: '{install-prefix}' + make-opts: '{make-opts}' + + wrappers: + - lf-infra-wrappers: + build-timeout: '{build-timeout}' + jenkins-ssh-credential: '{jenkins-ssh-credential}' + + builders: + - lf-infra-pre-build + - shell: '{pre-build}' + - inject: + # Switch this to the sonar wrapper when JJB 2.0 is available + properties-content: | + SONAR_HOST_URL=https://sonarcloud.io + SONAR_SCANNER_VERSION={sonar-scanner-version} + PROJECT_KEY={sonarcloud-project-key} + PROJECT_ORGANIZATION={sonarcloud-organization} + API_TOKEN={sonarcloud-api-token} + - shell: !include-raw-escape: ../shell/cmake-sonar.sh + - lf-provide-maven-settings-cleanup + + publishers: + - lf-infra-publish + +- job-template: + name: '{project-name}-cmake-sonar' + id: gerrit-cmake-sonar + concurrent: false + <<: *lf_cmake_sonar + + scm: + - lf-infra-gerrit-scm: + branch: '$GERRIT_BRANCH' + jenkins-ssh-credential: '{jenkins-ssh-credential}' + git-url: '{git-url}' + refspec: '$GERRIT_REFSPEC' + submodule-recursive: '{submodule-recursive}' + submodule-timeout: '{submodule-timeout}' + choosing-strategy: gerrit + + triggers: + - timed: '{obj:cron}' + - gerrit: + server-name: '{gerrit-server-name}' + trigger-on: + - comment-added-contains-event: + comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(stage-release)$' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + +- job-template: + name: '{project-name}-cmake-sonar' + id: github-cmake-sonar + concurrent: false + <<: *lf_cmake_sonar + + properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' + - github: + url: '{github-url}/{github-org}/{project}' + + scm: + - lf-infra-github-scm: + url: '{git-clone-url}{github-org}/{project}' + refspec: '+refs/pull/*:refs/remotes/origin/pr/*' + branch: '$sha1' + submodule-recursive: '{submodule-recursive}' + submodule-timeout: '{submodule-timeout}' + choosing-strategy: default + jenkins-ssh-credential: '{jenkins-ssh-credential}' + + triggers: + - timed: '{obj:cron}' + + ############### # CMAKE STAGE # ###############