Fixing Issues for OSC verified Jobs
Adding pm-producer, influxlogger and pm-file-converter ranpm jobs
Change-Id: Ia197f84dcfa57a70055a1ccbf67061eb2f4dc63b
Signed-off-by: rohithrajneesh <rohith.rajneesh@est.tech>
diff --git a/jjb/oransc/global-templates-oran-bash.yaml b/jjb/oransc/global-templates-oran-bash.yaml
index a1d30ab..f4ba915 100644
--- a/jjb/oransc/global-templates-oran-bash.yaml
+++ b/jjb/oransc/global-templates-oran-bash.yaml
@@ -19,11 +19,11 @@
default: ''
- string:
name: DIRECTORY
- default: {directory}
+ default: '{directory}'
description: Current Project Directory
- string:
- name: SCRIPT-NAME
- default: {script-name}
+ name: SCRIPT_NAME
+ default: '{script-name}'
description: Script to be executed
diff --git a/jjb/oransc/global-templates-oran-go.yaml b/jjb/oransc/global-templates-oran-go.yaml
index 478993c..2015c39 100644
--- a/jjb/oransc/global-templates-oran-go.yaml
+++ b/jjb/oransc/global-templates-oran-go.yaml
@@ -3,6 +3,7 @@
node: oransc-ubuntu2004
disabled: false
concurrent: true
+ directory:
properties:
- logrotate
@@ -19,7 +20,7 @@
default: ''
- string:
name: DIRECTORY
- default: ""
+ default: '{directory}'
description: Current Project Directory
scm:
diff --git a/jjb/oransc/global-templates-oran-java.yaml b/jjb/oransc/global-templates-oran-java.yaml
index 3521a27..97d45d6 100644
--- a/jjb/oransc/global-templates-oran-java.yaml
+++ b/jjb/oransc/global-templates-oran-java.yaml
@@ -3,6 +3,9 @@
node: oransc-ubuntu2004
disabled: false
concurrent: true
+ subdirectory:
+ trigger_branch_pattern: '**'
+ trigger_files_path_pattern: '**'
properties:
- logrotate
@@ -34,14 +37,10 @@
default: '/usr/local/go/bin'
description: Path to go executable
- string:
- name: TRIGGER_BRANCH_PATTERN
- default: '**'
- description: Branch patterns to trigger against
- - string:
- name: TRIGGER_FILES_PATH_PATTERN
- default: '**'
- description: File path pattern to trigger against
-
+ name: SUBDIRECTORY
+ default: '{subdirectory}'
+ description: Subdirectory of the project
+
scm:
- git-scm-gerrit:
ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
@@ -53,8 +52,8 @@
triggers:
- nordix-gerrit-trigger-patchset-created:
project: 'oransc/{project}'
- branch: $TRIGGER_BRANCH_PATTERN
- files: $TRIGGER_FILES_PATH_PATTERN
+ branch: '{trigger_branch_pattern}'
+ files: '{trigger_files_path_pattern}'
wrappers:
- build-timeout:
diff --git a/jjb/oransc/global-templates-oran-nonrtric.yaml b/jjb/oransc/global-templates-oran-nonrtric.yaml
deleted file mode 100644
index d084dc9..0000000
--- a/jjb/oransc/global-templates-oran-nonrtric.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-- job-template:
- name: 'oransc-{project-name}-verify'
- node: oransc-ubuntu2004
- disabled: false
- concurrent: true
-
- properties:
- - logrotate
-
-
- parameters:
- - nordix-gerrit-parameters
- - string:
- name: PROJECT
- default: 'oransc/{project}'
- description: JJB configured PROJECT parameter to identify a Nordix Gerrit project
- - string:
- name: GERRIT_REFSPEC
- default: ''
-
- scm:
- - git-scm-gerrit:
- ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
- branch: $GERRIT_BRANCH
- refspec: $GERRIT_REFSPEC
- wipe_workspace: true
- clean_before: false
-
- triggers:
- - nordix-gerrit-trigger-patchset-created:
- project: 'oransc/{project}'
- branch: '**'
- files: '**'
-
- wrappers:
- - build-timeout:
- timeout: 45
-
- builders:
- - shell:
- !include-raw-escape: ./verify-jobs-nonrtric.sh
diff --git a/jjb/oransc/nonrtric-plt-dmaapmediatorproducer/nonrtric-plt-dmaapmediatorproducer-verify-jobs.yaml b/jjb/oransc/nonrtric-plt-dmaapmediatorproducer/nonrtric-plt-dmaapmediatorproducer-verify-jobs.yaml
index d29db1c..6150ee8 100644
--- a/jjb/oransc/nonrtric-plt-dmaapmediatorproducer/nonrtric-plt-dmaapmediatorproducer-verify-jobs.yaml
+++ b/jjb/oransc/nonrtric-plt-dmaapmediatorproducer/nonrtric-plt-dmaapmediatorproducer-verify-jobs.yaml
@@ -1,6 +1,6 @@
---
# ============LICENSE_START=======================================================
-# Copyright (C) 2022 Nordix Foundation.
+# 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.
diff --git a/jjb/oransc/nonrtric-plt-informationcoordinatorservice/nonrtric-plt-informationcoordinatorservice-verify-jobs.yaml b/jjb/oransc/nonrtric-plt-informationcoordinatorservice/nonrtric-plt-informationcoordinatorservice-verify-jobs.yaml
index 36f5d6d..2c51a7d 100644
--- a/jjb/oransc/nonrtric-plt-informationcoordinatorservice/nonrtric-plt-informationcoordinatorservice-verify-jobs.yaml
+++ b/jjb/oransc/nonrtric-plt-informationcoordinatorservice/nonrtric-plt-informationcoordinatorservice-verify-jobs.yaml
@@ -1,6 +1,6 @@
---
# ============LICENSE_START=======================================================
-# Copyright (C) 2022 Nordix Foundation.
+# 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.
@@ -24,7 +24,7 @@
name: nonrtric-plt-informationcoordinatorservice-verify
project: nonrtric/plt/informationcoordinatorservice
project-name: nonrtric-plt-informationcoordinatorservice
- jdk-version: java-11
+ jdk-version: java-17
jobs:
- 'oransc-{project-name}-verify-java'
\ No newline at end of file
diff --git a/jjb/oransc/nonrtric-plt-ranpm/nonrtric-plt-ranpm-verify-jobs.yaml b/jjb/oransc/nonrtric-plt-ranpm/nonrtric-plt-ranpm-verify-jobs.yaml
index 2e865e2..98fdfb4 100644
--- a/jjb/oransc/nonrtric-plt-ranpm/nonrtric-plt-ranpm-verify-jobs.yaml
+++ b/jjb/oransc/nonrtric-plt-ranpm/nonrtric-plt-ranpm-verify-jobs.yaml
@@ -32,13 +32,55 @@
name: nonrtric-plt-ranpm-datafilecollector
project-name: nonrtric-plt-ranpm-datafilecollector
mvn-params: "-f datafilecollector -Dbuild.number=${{BUILD_NUMBER}}"
- gerrit_trigger_file_paths:
- - compare-type: REG_EXP
- pattern: "**/datafilecollector/**"
subdirectory: datafilecollector
- trigger_files_path_pattern: datafilecollector
+ trigger_branch_pattern: '**'
+ trigger_files_path_pattern: '**/datafilecollector/**'
jobs:
- 'oransc-{project-name}-verify-java'
stream:
- master:
branch: master
+
+# Jobs for nonrtric-plt-ranpm-pmproducer
+- project:
+ <<: *nonrtric_plt_ranpm_jdk_common
+ name: nonrtric-plt-ranpm-pmproducer
+ project-name: nonrtric-plt-ranpm-pmproducer
+ mvn-params: "-f pmproducer -Dbuild.number=${{BUILD_NUMBER}}"
+ subdirectory: pmproducer
+ trigger_branch_pattern: '**'
+ trigger_files_path_pattern: "**/pmproducer/**"
+ jobs:
+ - 'oransc-{project-name}-verify-java'
+ stream:
+ - master:
+ branch: master
+
+# Jobs for nonrtric-plt-ranpm-influxlogger
+- project:
+ <<: *nonrtric_plt_ranpm_jdk_common
+ name: nonrtric-plt-ranpm-influxlogger
+ project-name: nonrtric-plt-ranpm-influxlogger
+ mvn-params: "-f influxlogger -Dbuild.number=${{BUILD_NUMBER}}"
+ subdirectory: influxlogger
+ trigger_branch_pattern: '**'
+ trigger_files_path_pattern: "**/influxlogger/**"
+ jobs:
+ - 'oransc-{project-name}-verify-java'
+ stream:
+ - master:
+ branch: master
+
+# Jobs for nonrtric-plt-ranpm-pm-file-converter
+- project:
+ <<: *nonrtric_plt_ranpm_jdk_common
+ name: nonrtric-plt-ranpm-pm-file-converter
+ project-name: nonrtric-plt-ranpm-pm-file-converter"
+ subdirectory: pm-file-converter
+ trigger_branch_pattern: '**'
+ trigger_files_path_pattern: "**/pm-file-converter/**"
+ jobs:
+ - 'oransc-{project-name}-verify-go'
+ stream:
+ - master:
+ branch: master
diff --git a/jjb/oransc/nonrtric-rapp-healthcheck/nonrtric-rapp-healthcheck-verify-jobs.yaml b/jjb/oransc/nonrtric-rapp-healthcheck/nonrtric-rapp-healthcheck-verify-jobs.yaml
deleted file mode 100644
index 7260cee..0000000
--- a/jjb/oransc/nonrtric-rapp-healthcheck/nonrtric-rapp-healthcheck-verify-jobs.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-# ============LICENSE_START=======================================================
-# Copyright (C) 2022 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.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-# this job gets triggered when a change is proposed to
-# nonrtric/rapp/healthcheck project on Nordix Gerrit.
-
-- project:
- name: nonrtric-rapp-healthcheck-verify
- project: nonrtric/rapp/healthcheck
- project-name: nonrtric-rapp-healthcheck
- jdk-version: java-11
-
- jobs:
- - 'oransc-{project-name}-verify-java'
\ No newline at end of file
diff --git a/jjb/oransc/nonrtric/nonrtric-verify-jobs.yaml b/jjb/oransc/nonrtric/nonrtric-verify-jobs.yaml
index f01bd6f..81876ed 100644
--- a/jjb/oransc/nonrtric/nonrtric-verify-jobs.yaml
+++ b/jjb/oransc/nonrtric/nonrtric-verify-jobs.yaml
@@ -22,6 +22,7 @@
project: nonrtric
project-name: nonrtric
script-name: verify-jobs-nonrtric.sh
-
+ directory: test/auto-test
+
jobs:
- 'oransc-{project-name}-verify-bash'
diff --git a/jjb/oransc/verify-jobs-bash.sh b/jjb/oransc/verify-jobs-bash.sh
index 9524974..6aa74b8 100644
--- a/jjb/oransc/verify-jobs-bash.sh
+++ b/jjb/oransc/verify-jobs-bash.sh
@@ -2,7 +2,8 @@
set -euo pipefail
-DIRECTORY = $WORKSPACE"/"${DIRECTORY}
+DIRECTORY=$WORKSPACE"/"${DIRECTORY}
cd $DIRECTORY
-./${SCRIPT-NAME}
+chmod +x ${SCRIPT_NAME}
+./${SCRIPT_NAME}
diff --git a/jjb/oransc/verify-jobs-go.sh b/jjb/oransc/verify-jobs-go.sh
index 10f809c..1e0224b 100644
--- a/jjb/oransc/verify-jobs-go.sh
+++ b/jjb/oransc/verify-jobs-go.sh
@@ -2,7 +2,7 @@
set -euo pipefail
-DIRECTORY = $WORKSPACE"/"$DIRECTORY
+DIRECTORY=$WORKSPACE"/"${DIRECTORY}
cd $DIRECTORY
# Read desired Go version from go.mod file
diff --git a/jjb/oransc/verify-jobs-nonrtric.sh b/jjb/oransc/verify-jobs-nonrtric.sh
deleted file mode 100644
index d0ad54a..0000000
--- a/jjb/oransc/verify-jobs-nonrtric.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-
-TEST_DIRECTORY="test/auto-test"
-TEST_SCRIPT="./Suite-Verify-jobs.sh"
-DOCKER_COMPOSE_VERSION="v2.21.0"
-
-# Check if jq is installed, and install it if not
-if ! command -v jq &> /dev/null; then
- echo "Installing jq..."
- sudo apt-get update
- sudo apt-get install -y jq
-fi
-
-# Function to install Docker Compose version 2
-install_docker_compose() {
- echo "Installing Docker Compose version 2..."
- sudo curl -L "https://github.com/docker/compose/releases/download/"$DOCKER_COMPOSE_VERSION"/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- sudo ln -s /usr/local/bin/docker-compose /usr/libexec/docker/cli-plugins/docker-compose
-}
-
-# Function to remove Docker Compose
-remove_docker_compose() {
- echo "Removing Docker Compose..."
- sudo rm /usr/local/bin/docker-compose
-}
-
-# Check if docker-compose is installed, and install it if not
-if ! command -v docker-compose &> /dev/null; then
- install_docker_compose
-fi
-
-cd "$TEST_DIRECTORY"
-sudo chmod 775 "$TEST_SCRIPT"
-"$TEST_SCRIPT" remote-remove docker release --env-file ../common/test_env-oran-h-release.sh
-
-# Remove docker-compose after tests are done
-if command -v docker-compose &> /dev/null; then
- remove_docker_compose
-fi
-
-# Remove jq after tests are done
-if command -v jq &> /dev/null; then
- echo "Removing jq..."
- sudo apt-get remove -y jq
-fi