Aligning NONRTRIC Verify job as generic
Change-Id: I24b27f42ed63395f372f4b65e7875147e2e72d38
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
new file mode 100644
index 0000000..a1d30ab
--- /dev/null
+++ b/jjb/oransc/global-templates-oran-bash.yaml
@@ -0,0 +1,50 @@
+- job-template:
+ name: 'oransc-{project-name}-verify-bash'
+ 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: ''
+ - string:
+ name: DIRECTORY
+ default: {directory}
+ description: Current Project Directory
+ - string:
+ name: SCRIPT-NAME
+ default: {script-name}
+ description: Script to be executed
+
+
+ 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-bash.sh
diff --git a/jjb/oransc/nonrtric/nonrtric-verify-jobs.yaml b/jjb/oransc/nonrtric/nonrtric-verify-jobs.yaml
index cd0df23..f01bd6f 100644
--- a/jjb/oransc/nonrtric/nonrtric-verify-jobs.yaml
+++ b/jjb/oransc/nonrtric/nonrtric-verify-jobs.yaml
@@ -21,6 +21,7 @@
name: nonrtric-verify
project: nonrtric
project-name: nonrtric
+ script-name: verify-jobs-nonrtric.sh
jobs:
- - 'oransc-{project-name}-verify'
+ - 'oransc-{project-name}-verify-bash'
diff --git a/jjb/oransc/verify-jobs-bash.sh b/jjb/oransc/verify-jobs-bash.sh
new file mode 100644
index 0000000..9524974
--- /dev/null
+++ b/jjb/oransc/verify-jobs-bash.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+set -euo pipefail
+
+DIRECTORY = $WORKSPACE"/"${DIRECTORY}
+cd $DIRECTORY
+
+./${SCRIPT-NAME}