This change adds the job to trigger sonar scans on the ric-plt-tracelibcpp repo.
Issue-ID: 693
Signed-off-by: Alok Bhatt <alok_bh@hcl.com>
Change-Id: I7e23364bf6dacaec25778f386e82b58fdbc85f10
diff --git a/jjb/ric-plt-tracelibcpp/ric-plt-tracelibcpp.yaml b/jjb/ric-plt-tracelibcpp/ric-plt-tracelibcpp.yaml
index c9784bd..a1b306a 100644
--- a/jjb/ric-plt-tracelibcpp/ric-plt-tracelibcpp.yaml
+++ b/jjb/ric-plt-tracelibcpp/ric-plt-tracelibcpp.yaml
@@ -13,37 +13,92 @@
jobs:
- gerrit-info-yaml-verify
-- tracelibcpp_docker_common: &tracelibcpp_docker_common
- # values apply to all tracelibcpp docker projects
- name: tracelibcpp-docker-common
- # git repo
+- tracelibcpp_common: &tracelibcpp_common
+ name: tracelibcpp-common
+ # git repo
project: ric-plt/tracelibcpp
# jenkins job name prefix
project-name: ric-plt-tracelibcpp
- # maven settings file has docker credentials
+ # maven settings file has credentials to archive artifacts
mvn-settings: ric-plt-tracelibcpp-settings
+ # test scripts depend on this name
+ build-dir: $WORKSPACE/build
+ # Use ubuntu base for cmake v3
+ # Use docker variant for packagecloud ruby gem
+ build-node: ubuntu1804-docker-4c-4g
+ # pre-build scripts for CMake templates:
+ # install alien package to build RPMS
+ # install RMR per version file in repo
+ pre-build: !include-raw-escape:
+ - ../shell/install-deb-alien.sh
+ # skip install in cmake-build.sh
+ install: false
+# verify every commit
- project:
- <<: *tracelibcpp_docker_common
- name: ric-plt-tracelibcpp
- # image name, altho it is never pushed
- docker-name: '{name}'
- # use host network
- docker-build-args: '--network=host -f ci/Dockerfile'
- # image tag; use a fixed value
- container-tag-method: latest
+ <<: *tracelibcpp_common
+ name: tracelibcpp-verify
+ cmake-opts: -DDEV_PKG=1
+ make-opts: package test ARGS=-V
jobs:
- - gerrit-docker-verify
- - oran-gerrit-docker-ci-pc-merge
+ - gerrit-cmake-verify
stream:
- master:
branch: master
+# development library - package and publish
- project:
+ <<: *tracelibcpp_common
+ name: ric-plt-tracelibcpp-dev
+ project-name: '{name}'
+ cmake-opts: -DDEV_PKG=1
+ make-opts: package
+ install-prefix: /usr/local
+ jobs:
+ - gerrit-cmake-packagecloud-stage
+ stream:
+ - master:
+ branch: master
+
+# runtime library - package and publish
+- project:
+ <<: *tracelibcpp_common
+ name: ric-plt-tracelibcpp-rt
+ project-name: '{name}'
+ cmake-opts: -DDEV_PKG=0
+ make-opts: package
+ install-prefix: /usr/local
+ jobs:
+ - gerrit-cmake-packagecloud-stage
+ stream:
+ - master:
+ branch: master
+
+# promote deb/rpm from staging to release at PackageCloud.io
+- project:
+ <<: *tracelibcpp_common
name: ric-plt-tracelibcpp-release
- project: ric-plt/tracelibcpp
- project-name: ric-plt-tracelibcpp
+ # release uses sigul which requires centos
build-node: centos7-builder-1c-1g
jobs:
- gerrit-packagecloud-release-verify
- gerrit-packagecloud-release-merge
+
+# analyze C code and test coverage
+- project:
+ name: tracelibcpp-sonarqube
+ <<: *tracelibcpp_common
+ make-opts: -j8 all
+ sonar-project-file: ""
+ sonar-properties: |
+ sonar.login={sonarcloud_api_token}
+ sonar.projectKey={sonarcloud_project_organization}_{project-name}
+ sonar.projectName={project-name}
+ sonar.organization={sonarcloud_project_organization}
+ sonar.scanner.force-deprecated-java-version=true
+ sonar.build.sourceEncoding=UTF-8
+ sonar.sources=src
+ sonar.cfamily.build-wrapper-output=$WORKSPACE/bw-output
+ sonar.cfamily.gcov.reportsPath=test
+ jobs:
+ - gerrit-cmake-sonarqube