branch: master
- h-release:
branch: h-release
+
+# Jobs for nonrtric-plt-ranpm-pm-file-converter SONAR
+- project:
+ <<: *nonrtric_plt_ranpm_jdk_common
+ name: nonrtric-plt-ranpm-pm-file-converter-sonar
+ # prescan script requires ubuntu
+ # golang is only on docker-enabled nodes
+ build-node: ubuntu1804-docker-4c-4g
+ gerrit_trigger_file_paths:
+ - compare-type: REG_EXP
+ pattern: "pm-file-converter/.*"
+ sonar-prescan-script: !include-raw-escape: prescan-pm-file-converter-ubuntu.sh
+ sonar-project-file: ""
+ java-version: openjdk11
+ # use sonarcloud values from defaults.yaml
+ sonar-properties: !include-raw-escape: sonar-project.properties
+ jobs:
+ - gerrit-sonar-prescan-script
--- /dev/null
+#!/bin/sh
+##############################################################################
+#
+# Copyright (C) 2023: Nordix Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##############################################################################
+
+echo "--> prescan-pm-file-converter-ubuntu.sh"
+
+set -ex
+
+# Assumes ubuntu - uses apt-get
+sudo apt-get update
+
+# build script execution
+bash pm-file-converter/build-pm-file-converter-ubuntu.sh
+
+echo "--> prescan-pm-file-converter-ubuntu.sh ends"
+
--- /dev/null
+# Required metadata\r
+sonar.login={sonarcloud_api_token}\r
+sonar.projectKey={sonarcloud_project_organization}_{project-name}\r
+sonar.organization={sonarcloud_project_organization}\r
+# Encoding\r
+sonar.build.sourceEncoding=UTF-8\r
+# Language\r
+sonar.language=go\r
+# Source\r
+sonar.sources=.\r
+# Unit tests\r
+sonar.go.coverage.reportPaths=pm-file-converter/coverage.txt\r
+# Inclusions\r
+sonar.inclusions=pm-file-converter/main.go,pm-file-converter/common/**/**.go,pm-file-converter/components/**/**.go\r
+# Exclusions (TODO)\r
+sonar.exclusions=pm-file-converter/components/xmltransform/xmltransform_test.go\r