From 640269602f4859073cd25b49c753bb060bc7debb Mon Sep 17 00:00:00 2001 From: ychacon Date: Fri, 18 Feb 2022 09:51:37 +0100 Subject: [PATCH] Add config for new nonrtric-rapp-ransliceassurance repo Issue-ID: NONRTRIC-710 Signed-off-by: ychacon Change-Id: I063fccda12d9057db4462cdf14910527c1f75301 --- .../nonrtric-rapp-ransliceassurance.yaml | 56 ++++++++++++++++++++++ .../prescan-ransliceassurance-ubuntu.sh | 30 ++++++++++++ .../sonar-project.properties | 16 +++++++ 3 files changed, 102 insertions(+) create mode 100644 jjb/nonrtric-rapp-ransliceassurance/prescan-ransliceassurance-ubuntu.sh create mode 100644 jjb/nonrtric-rapp-ransliceassurance/sonar-project.properties diff --git a/jjb/nonrtric-rapp-ransliceassurance/nonrtric-rapp-ransliceassurance.yaml b/jjb/nonrtric-rapp-ransliceassurance/nonrtric-rapp-ransliceassurance.yaml index fe3bb4d4..e49cf8cb 100644 --- a/jjb/nonrtric-rapp-ransliceassurance/nonrtric-rapp-ransliceassurance.yaml +++ b/jjb/nonrtric-rapp-ransliceassurance/nonrtric-rapp-ransliceassurance.yaml @@ -12,3 +12,59 @@ build-node: centos7-builder-1c-1g jobs: - gerrit-info-yaml-verify + +- ransliceassurance_common: &ransliceassurance_common + name: ransliceassurance-common + # git repo + project: nonrtric/rapp/ransliceassurance + # jenkins job name prefix + project-name: nonrtric-rapp-ransliceassurance + # maven settings file has docker credentials + mvn-settings: nonrtric-rapp-ransliceassurance-settings + +- project: + <<: *ransliceassurance_common + name: nonrtric-rapp-ransliceassurance-release + # maven release requires sigul which requires centos + # container release requires docker + build-node: centos7-docker-2c-8g + jobs: + - '{project-name}-gerrit-release-jobs' + +- project: + <<: *ransliceassurance_common + name: nonrtric-rapp-ransliceassurance + project-name: '{name}' + # image name + docker-name: 'o-ran-sc/nonrtric-rapp-ransliceassurance' + # get tag from YAML + container-tag-method: yaml-file + # use host network to clone from our gerrit + docker-build-args: '--network=host' + # Directory with Dockerfile + docker-root: 'smoversion' + # Directory where go test should be run + go-root: 'smoversion' + build-node: ubuntu1804-docker-4c-4g + # Includes verify and merge jobs + jobs: + - "{project-name}-gerrit-docker-jobs" + - gerrit-go-verify + stream: + - master: + branch: master + +- project: + <<: *ransliceassurance_common + name: nonrtric-rapp-ransliceassurance-sonar + project-name: nonrtric-rapp-ransliceassurance + # prescan script requires ubuntu + # golang is only on docker-enabled nodes + build-node: ubuntu1804-docker-4c-4g + sonar-prescan-script: !include-raw-escape: prescan-ransliceassurance-ubuntu.sh + sonar-project-file: "" + java-version: openjdk11 + # use sonarcloud values from defaults.yaml + sonar-properties: !include-raw: sonar-project.properties + jobs: + - gerrit-sonar-prescan-script \ No newline at end of file diff --git a/jjb/nonrtric-rapp-ransliceassurance/prescan-ransliceassurance-ubuntu.sh b/jjb/nonrtric-rapp-ransliceassurance/prescan-ransliceassurance-ubuntu.sh new file mode 100644 index 00000000..bcb4e310 --- /dev/null +++ b/jjb/nonrtric-rapp-ransliceassurance/prescan-ransliceassurance-ubuntu.sh @@ -0,0 +1,30 @@ +#!/bin/sh +############################################################################## +# +# Copyright (C) 2021: 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-ransliceassurance-ubuntu.sh" + +set -ex + +# Assumes ubuntu - uses apt-get +sudo apt-get update + +# build script execution +bash smoversion/build-ransliceassurance-ubuntu.sh + +echo "--> prescan-ransliceassurance-ubuntu.sh ends" diff --git a/jjb/nonrtric-rapp-ransliceassurance/sonar-project.properties b/jjb/nonrtric-rapp-ransliceassurance/sonar-project.properties new file mode 100644 index 00000000..38534a39 --- /dev/null +++ b/jjb/nonrtric-rapp-ransliceassurance/sonar-project.properties @@ -0,0 +1,16 @@ +# Required metadata +sonar.login={sonarcloud_api_token} +sonar.projectKey={sonarcloud_project_organization}_{project-name} +sonar.organization={sonarcloud_project_organization} +# Encoding +sonar.build.sourceEncoding=UTF-8 +# Language +sonar.language=go +# Source +sonar.sources=. +# Unit tests +sonar.go.coverage.reportPaths=smoversion/coverage.txt +# Inclusions +sonar.inclusions=smoversion/internal/**/**.go +# Exclusions +sonar.exclusions=smoversion/main.go,smoversion/stub/**.go,smoversion/internal/**/**_test.go -- 2.16.6