From 601a6cc6817f64c5ed0721e16426b74b1b457b61 Mon Sep 17 00:00:00 2001 From: "Lott, Christopher (cl778h)" Date: Tue, 15 Oct 2019 15:43:14 -0400 Subject: [PATCH] Move sonarcloud config parameters to defaults Use values from defaults in project definitions via {} instead of hardcoding repeatedly. Signed-off-by: Lott, Christopher (cl778h) Change-Id: Iaf5ba470feaeb2caed3bf43a23d83e5fbfc9b9cc --- jjb/defaults.yaml | 5 +++++ jjb/portal-ric-dashboard/portal-ric-dashboard.yaml | 6 +++--- jjb/ric-plt-a1/ric-plt-a1.yaml | 6 +++--- jjb/ric-plt-lib-rmr/ric-plt-lib-rmr.yaml | 18 ++++++++++++++++++ 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/jjb/defaults.yaml b/jjb/defaults.yaml index 31452536..57857947 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 f7a1790d..9374d8a8 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 ee92f647..a9118ea7 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 aa7bcdce..15713956 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 -- 2.16.6