Merge "Move sonarcloud config parameters to defaults"
diff --git a/jjb/defaults.yaml b/jjb/defaults.yaml
index 3145253..5785794 100644
--- a/jjb/defaults.yaml
+++ b/jjb/defaults.yaml
@@ -46,3 +46,8 @@
     packagecloud-repo: staging
     debian-distribution-versions: debian/stretch
     rpm-distribution-versions: el/5
+
+    # Sonarcloud
+    sonarcloud_project_organization: o-ran-sc
+    sonarcloud_api_token: d9e23c28dc39b6d7531d2ecabf122ce84e6253ef
+
diff --git a/jjb/portal-ric-dashboard/portal-ric-dashboard.yaml b/jjb/portal-ric-dashboard/portal-ric-dashboard.yaml
index f7a1790..9374d8a 100644
--- a/jjb/portal-ric-dashboard/portal-ric-dashboard.yaml
+++ b/jjb/portal-ric-dashboard/portal-ric-dashboard.yaml
@@ -52,8 +52,8 @@
     mvn-goals: test
     branch: master
     sonarcloud: true
-    sonarcloud-project-key: o-ran-sc_portal-ric-dashboard
-    sonarcloud-project-organization: o-ran-sc
-    sonarcloud-api-token: d9e23c28dc39b6d7531d2ecabf122ce84e6253ef
+    sonarcloud-api-token: '{sonarcloud_api_token}'
+    sonarcloud-project-key: '{sonarcloud_project_organization}_{project-name}'
+    sonarcloud-project-organization: '{sonarcloud_project_organization}'
     jobs:
       - gerrit-maven-sonar
diff --git a/jjb/ric-plt-a1/ric-plt-a1.yaml b/jjb/ric-plt-a1/ric-plt-a1.yaml
index ee92f64..a9118ea 100644
--- a/jjb/ric-plt-a1/ric-plt-a1.yaml
+++ b/jjb/ric-plt-a1/ric-plt-a1.yaml
@@ -64,8 +64,8 @@
     pre-build-script: !include-raw-escape:
       - ../shell/install-deb-nng-rmr.sh
     sonarcloud: true
-    sonarcloud-project-key: o-ran-sc_ric-plt-a1
-    sonarcloud-project-organization: o-ran-sc
-    sonarcloud-api-token: d9e23c28dc39b6d7531d2ecabf122ce84e6253ef
+    sonarcloud-api-token: '{sonarcloud_api_token}'
+    sonarcloud-project-key: '{sonarcloud_project_organization}_{project-name}'
+    sonarcloud-project-organization: '{sonarcloud_project_organization}'
     jobs:
       - gerrit-tox-sonar
diff --git a/jjb/ric-plt-lib-rmr/ric-plt-lib-rmr.yaml b/jjb/ric-plt-lib-rmr/ric-plt-lib-rmr.yaml
index aa7bcdc..1571395 100644
--- a/jjb/ric-plt-lib-rmr/ric-plt-lib-rmr.yaml
+++ b/jjb/ric-plt-lib-rmr/ric-plt-lib-rmr.yaml
@@ -82,3 +82,21 @@
     jobs:
       - gerrit-pypi-release-verify
       - gerrit-pypi-release-merge
+
+- project:
+    <<: *rmr_common
+    name: ric-plt-lib-rmr-python-sonar
+    project-name: ric-plt-lib-rmr-python
+    branch: master
+    python-version: python3
+    # the pre-build-script installs debian packages
+    build-node: ubuntu1804-builder-2c-2ga
+    # install prereqs
+    pre-build-script: !include-raw-escape: ../shell/install-deb-nng-rmr.sh
+    sonarcloud: true
+    sonarcloud-api-token: '{sonarcloud_api_token}'
+    sonarcloud-project-key: '{sonarcloud_project_organization}_{project-name}'
+    sonarcloud-project-organization: '{sonarcloud_project_organization}'
+    tox-dir: src/bindings/rmr-python
+    jobs:
+      - gerrit-tox-sonar