From d6c0f9752d30bd07a7641e8f11a4e457a5c97e8c Mon Sep 17 00:00:00 2001 From: elinuxhenrik Date: Thu, 7 Apr 2022 16:59:45 +0200 Subject: [PATCH] Add jobs for nonrtric-rapp-orufhrecovery Issue-ID: NONRTRIC-711 Signed-off-by: elinuxhenrik Change-Id: Ic19859bf75e75d47404af2c91995fd4bc50b023d --- .../nonrtric-rapp-orufhrecovery.yaml | 86 +++++++++++++++++++++- .../prescan-oruclosedloopconsumer-ubuntu.sh | 30 ++++++++ 2 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 jjb/nonrtric-rapp-orufhrecovery/prescan-oruclosedloopconsumer-ubuntu.sh diff --git a/jjb/nonrtric-rapp-orufhrecovery/nonrtric-rapp-orufhrecovery.yaml b/jjb/nonrtric-rapp-orufhrecovery/nonrtric-rapp-orufhrecovery.yaml index e63df7e2..2b9f58e7 100644 --- a/jjb/nonrtric-rapp-orufhrecovery/nonrtric-rapp-orufhrecovery.yaml +++ b/jjb/nonrtric-rapp-orufhrecovery/nonrtric-rapp-orufhrecovery.yaml @@ -5,10 +5,94 @@ views: - project-view -- project: +- project: &orufhrecovery_common name: nonrtric-rapp-orufhrecovery-info project: nonrtric/rapp/orufhrecovery project-name: nonrtric-rapp-orufhrecovery + # maven settings file has docker credentials + mvn-settings: nonrtric-rapp-orufhrecovery-settings build-node: centos7-builder-1c-1g jobs: - gerrit-info-yaml-verify + +- project: + <<: *orufhrecovery_common + name: nonrtric-rapp-orufhrecovery + project-name: '{name}' + # image name + docker-name: 'o-ran-sc/nonrtric-rapp-orufhrecovery' + # 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: 'scriptversion/app' + # Limit build trigger to appropriate files + gerrit_trigger_file_paths: + - compare-type: REG_EXP + pattern: 'scriptversion/app/.*' + build-node: ubuntu1804-docker-4c-4g + # Includes verify and merge jobs + jobs: + - "{project-name}-gerrit-docker-jobs" + stream: + - master: + branch: master + +- project: + <<: *orufhrecovery_common + name: nonrtric-rapp-orufhrecovery-consumer + project-name: '{name}' + # image name + docker-name: 'o-ran-sc/nonrtric-rapp-orufhrecovery-consumer' + # 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: 'goversion' + # Directory where go test should be run + go-root: 'goversion' + # Limit build trigger to appropriate files + gerrit_trigger_file_paths: + - compare-type: REG_EXP + pattern: 'goversion/.*' + 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: + <<: *orufhrecovery_common + name: nonrtric-rapp-orufhrecovery-consumer-sonar + project-name: '{name}' + # prescan script requires ubuntu + # golang is only on docker-enabled nodes + build-node: ubuntu1804-docker-4c-4g + sonar-prescan-script: !include-raw-escape: prescan-oruclosedloopconsumer-ubuntu.sh + sonar-project-file: "" + java-version: openjdk11 + # use sonarcloud values from defaults.yaml + sonar-properties: | + # Required metadata + sonar.login={sonarcloud_api_token} + sonar.projectKey={sonarcloud_project_organization}_nonrtric-rapp-orufhrecovery-consumer + sonar.organization={sonarcloud_project_organization} + # Encoding + sonar.build.sourceEncoding=UTF-8 + # Language + sonar.language=go + # Source + sonar.sources=. + # Unit tests + sonar.go.coverage.reportPaths=goversion/coverage.txt + # Inclusions + sonar.inclusions=goversion/internal/**/**.go,goversion/**.go + # Exclusions + sonar.exclusions=goversion/mocks/**.go,goversion/internal/**/**_test.go,goversion/**_test.go,goversion/simulator/**.go + jobs: + - gerrit-sonar-prescan-script diff --git a/jjb/nonrtric-rapp-orufhrecovery/prescan-oruclosedloopconsumer-ubuntu.sh b/jjb/nonrtric-rapp-orufhrecovery/prescan-oruclosedloopconsumer-ubuntu.sh new file mode 100644 index 00000000..f13df5a2 --- /dev/null +++ b/jjb/nonrtric-rapp-orufhrecovery/prescan-oruclosedloopconsumer-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-oruclosedloopconsumer-ubuntu.sh" + +set -ex + +# Assumes ubuntu - uses apt-get +sudo apt-get update + +# build script execution +bash test/usecases/oruclosedlooprecovery/goversion/build-oruclosedloopconsumer-ubuntu.sh + +echo "--> prescan-oruclosedloopconsumer-ubuntu.sh ends" -- 2.16.6