Aligning NONRTRIC Verify job as generic 60/19360/3
authorrohithrajneesh <rohith.rajneesh@est.tech>
Fri, 15 Sep 2023 15:35:19 +0000 (16:35 +0100)
committerrohithrajneesh <rohith.rajneesh@est.tech>
Mon, 18 Sep 2023 15:34:13 +0000 (16:34 +0100)
Change-Id: I24b27f42ed63395f372f4b65e7875147e2e72d38
Signed-off-by: rohithrajneesh <rohith.rajneesh@est.tech>
jjb/oransc/global-templates-oran-bash.yaml [new file with mode: 0644]
jjb/oransc/nonrtric/nonrtric-verify-jobs.yaml
jjb/oransc/verify-jobs-bash.sh [new file with mode: 0644]

diff --git a/jjb/oransc/global-templates-oran-bash.yaml b/jjb/oransc/global-templates-oran-bash.yaml
new file mode 100644 (file)
index 0000000..a1d30ab
--- /dev/null
@@ -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
index cd0df2349c9a670aa161c48842ea04929f679e13..f01bd6f33d6f7b74e66c005774cd0358d3089c53 100644 (file)
@@ -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 (file)
index 0000000..9524974
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+set -euo pipefail
+
+DIRECTORY = $WORKSPACE"/"${DIRECTORY}
+cd $DIRECTORY
+
+./${SCRIPT-NAME}