Merge "introduce dynamic periodic fullstack job"
diff --git a/jjb/metal3/baremetal-operator/jjb-bmo-e2e.yaml b/jjb/metal3/baremetal-operator/jjb-bmo-e2e.yaml
deleted file mode 100644
index 101cb76..0000000
--- a/jjb/metal3/baremetal-operator/jjb-bmo-e2e.yaml
+++ /dev/null
@@ -1,103 +0,0 @@
-- project:
-    name: bmo
-    # Default "type" of job is "pull", as in pull request,
-    # and the default GINKGO_FOCUS is empty (all tests required in BMO PRs)
-    type: pull
-    GINKGO_FOCUS: " "
-    # Default BMO branch to trigger the test in is "main"
-    BRANCH_NAME: "main"
-    # These jobs are triggered by prow for PRs (empty trigger here) or by timer (see below)
-    triggers: []
-
-    jobs:
-    - "{job_prefix}-{name}-e2e-test-{type}"
-    # This job runs the "optional" set, which currently includes only "upgrade" tests
-    - "{job_prefix}-{name}-e2e-test-{type}":
-        type: optional-pull
-        GINKGO_FOCUS: "upgrade"
-    - "{job_prefix}-{name}-e2e-test-{type}":
-        type: periodic
-        triggers:
-        # Run at 02:45 (UTC) every day
-        - timed: "45 2 * * *"
-    - "{job_prefix}-{name}-e2e-test-{type}":
-        type: optional-periodic
-        GINKGO_FOCUS: "upgrade"
-        triggers:
-        # Run at 03:45 (UTC) every day
-        - timed: "45 3 * * *"
-
-    # Pediodic jobs for release branches
-    - "{job_prefix}-{name}-e2e-test-{type}":
-        type: periodic-release-0.6
-        BRANCH_NAME: "release-0.6"
-        triggers:
-        # Run at 01:45 (UTC) every odd day
-        - timed: "45 1 1-31/2 * *"
-    - "{job_prefix}-{name}-e2e-test-{type}":
-        type: periodic-release-0.5
-        BRANCH_NAME: "release-0.5"
-        triggers:
-        # Run at 01:45 (UTC) every even day
-        - timed: "45 1 2-30/2 * *"
-
-- job-template:
-    name: "{job_prefix}-{name}-e2e-test-{type}"
-    project-type: pipeline
-    defaults: global
-    disabled: False
-    concurrent: True
-
-    parameters:
-    # Parameters set by Prow
-    - string:
-        name: BUILD_ID
-        description: 'Used by Prow when triggering jobs'
-    - string:
-        name: PROW_JOB_ID
-        description: 'Used by Prow when triggering jobs'
-    - string:
-        name: REPO_OWNER
-        description: 'Project github repo org name'
-    - string:
-        name: REPO_NAME
-        description: 'Project github repo name'
-    - string:
-        name: PULL_BASE_REF
-        default: '{BRANCH_NAME}'
-        description: 'Ref name of the base branch'
-    - string:
-        name: PULL_PULL_SHA
-        default: '{BRANCH_NAME}' # Default set to branch name. This is needed when running periodic jobs
-        description: 'Pull request head SHA'
-    # End of Prow parameters
-    - string:
-        name: GINKGO_FOCUS
-        default: '{GINKGO_FOCUS}'
-        description: 'The focus test to run'
-
-    properties:
-    - build-discarder:
-        days-to-keep: 30
-        num-to-keep: 300
-        artifact-days-to-keep: -1
-        artifact-num-to-keep: -1
-    - github:
-        url: https://github.com/metal3-io/baremetal-operator
-
-    triggers: "{triggers}"
-
-    pipeline-scm:
-      scm:
-      - git:
-          url: "{ci_github_repo}"
-          credentials-id: "{ci_github_jenkins_credentials_id}"
-          branches:
-          - "{branch|main}"
-          name: 'origin'
-          refspec: "+refs/heads/*:refs/remotes/origin/*"
-          wipe-workspace: True
-          honor-refspec: True
-          shallow-clone: False
-      script-path: "jenkins/jobs/bmo_e2e_tests.pipeline"
-      lightweight-checkout: False
diff --git a/jjb/metal3/job_bml_integration_tests.yml b/jjb/metal3/job_bml_integration_tests.yml
index 24627af..e5d9bed 100644
--- a/jjb/metal3/job_bml_integration_tests.yml
+++ b/jjb/metal3/job_bml_integration_tests.yml
@@ -27,7 +27,7 @@
 
 - job-template:
     id: bml_integration_tests
-    name: '{job_prefix}-bml-integration-tests-{image_os}'
+    name: '{job_prefix}-bml-integration-test-{image_os}'
     description: "CAPM3 v1beta1 integration tests on {image_os} in Bare Metal Lab."
     project-type: pipeline
     defaults: global
diff --git a/jjb/metal3/job_bml_periodic_integration_tests.yml b/jjb/metal3/job_bml_periodic_integration_tests.yml
index dd36602..1919e02 100644
--- a/jjb/metal3/job_bml_periodic_integration_tests.yml
+++ b/jjb/metal3/job_bml_periodic_integration_tests.yml
@@ -27,7 +27,7 @@
 
 - job-template:
     id: bml_periodic_integration_tests
-    name: '{job_prefix}-periodic-bml-integration_tests-{image_os}'
+    name: '{job_prefix}-periodic-bml-integration-test-{image_os}'
     description: "CAPM3 v1beta1 periodic integration tests on {image_os} in Bare Metal Lab."
     project-type: pipeline
     defaults: global
diff --git a/jjb/metal3/projects.yml b/jjb/metal3/projects.yml
index dab6791..dc04b50 100644
--- a/jjb/metal3/projects.yml
+++ b/jjb/metal3/projects.yml
@@ -39,8 +39,8 @@
     - fullstack_building_test
     - artifact_cleanup
     repo:
-      org: "Nordix"
-      name: "metal3-dev-tools"
+        org: "Nordix"
+        name: "metal3-dev-tools"
     ci_github_jenkins_credentials_id: 'nordix-metal3-ci-github-prod-token'
     ci_ghprb_auth_id: '86c49704-5474-4524-97b7-805323b2c39a'
     ci_github_repo: 'https://github.com/Nordix/metal3-dev-tools.git'
@@ -68,8 +68,8 @@
 - project:
     name: 'project_infra'
     repo:
-      org: "metal3-io"
-      name: "project-infra"
+        org: "metal3-io"
+        name: "project-infra"
     jobs:
     - fullstack_project-infra_building_test
     - periodic_dynamic_fullstack_building
@@ -109,19 +109,19 @@
             capm3_version: v1beta1
             capm3_release_branch: main
             bmo_release_branch: main
-            schedule: "H 4 * * *"
+            schedule: "H 1 * * *"
         - release-1-7:
             capi_version: v1beta1
             capm3_version: v1beta1
             capm3_release_branch: release-1.7
             bmo_release_branch: release-0.6
-            schedule: "30 4 * * *"
+            schedule: "30 1 * * *"
         - release-1-6:
             capi_version: v1beta1
             capm3_version: v1beta1
             capm3_release_branch: release-1.6
             bmo_release_branch: release-0.5
-            schedule: "30 4 * * *"
+            schedule: "30 1 * * *"
     - capm3_e2e_feature_tests_prow:
         capm3_target_branch:
         - main:
@@ -151,25 +151,25 @@
             capm3_version: v1beta1
             capm3_release_branch: main
             bmo_release_branch: main
-            schedule: "H 22 2-30/2 * *" # Runs on even days 10 PM
+            schedule: "H 19 2-30/2 * *" # Runs on even days 7 PM
         - release-1-7:
             capi_version: v1beta1
             capm3_version: v1beta1
             capm3_release_branch: release-1.7
             bmo_release_branch: release-0.6
-            schedule: "H 3 2-30/2 * *" # Runs on even days 3 AM
+            schedule: "H 0 2-30/2 * *" # Runs on even days 0 AM
         - release-1-6:
             capi_version: v1beta1
             capm3_version: v1beta1
             capm3_release_branch: release-1.6
             bmo_release_branch: release-0.5
-            schedule: "H 8 2-30/2 * *" # Runs on even days 8 AM
+            schedule: "H 5 2-30/2 * *" # Runs on even days 5 AM
         - release-1-5:
             capi_version: v1beta1
             capm3_version: v1beta1
             capm3_release_branch: release-1.5
             bmo_release_branch: release-0.4
-            schedule: "H 13 2-30/2 * *" # Runs on even days 1 PM
+            schedule: "H 10 2-30/2 * *" # Runs on even days 10 AM
         exclude:
         - image_os: ubuntu # This is to disable the tests running on ubuntu, to save resources
     - capm3_e2e_clusterctl_upgrade_tests_prow:
@@ -225,19 +225,19 @@
         - main:
             capm3_release_branch: main
             bmo_release_branch: main
-            schedule: "H 1 * * 2,4,6"
+            schedule: "H 22 * * 1,3,5"
         - release-1-7:
             capm3_release_branch: release-1.7
             bmo_release_branch: release-0.6
-            schedule: "H 1 * * 1"
+            schedule: "H 22 * * 0"
         - release-1-6:
             capm3_release_branch: release-1.6
             bmo_release_branch: release-0.5
-            schedule: "H 1 * * 3"
+            schedule: "H 22 * * 2"
         - release-1-5:
             capm3_release_branch: release-1.5
             bmo_release_branch: release-0.4
-            schedule: "H 1 * * 5"
+            schedule: "H 22 * * 4"
         exclude:
         - image_os: centos
     - capm3_periodic_e2e_k8s_upgrade_tests_prow:
@@ -249,7 +249,7 @@
             capm3_release_branch: main
             bmo_release_branch: main
             capm3_target_branch: main
-            schedule: "H 4 * * 1"
+            schedule: "H 3 * * 1"
         - 1-29-1-30:
             k8s_version_upgrade_from: v1.29.0
             k8s_version_upgrade_to: v1.30.0
@@ -257,7 +257,7 @@
             capm3_release_branch: release-1.7
             bmo_release_branch: release-0.6
             capm3_target_branch: release-1-7
-            schedule: "H 4 * * 2"
+            schedule: "H 3 * * 2"
         - 1-28-1-29:
             k8s_version_upgrade_from: v1.28.1
             k8s_version_upgrade_to: v1.29.0
@@ -265,7 +265,7 @@
             capm3_release_branch: release-1.6
             bmo_release_branch: release-0.5
             capm3_target_branch: release-1-6
-            schedule: "H 4 * * 3"
+            schedule: "H 3 * * 3"
         - 1-26-1-27:
             k8s_version_upgrade_from: v1.26.4
             k8s_version_upgrade_to: v1.27.4
@@ -273,7 +273,7 @@
             capm3_release_branch: release-1.5
             bmo_release_branch: release-0.4
             capm3_target_branch: release-1-5
-            schedule: "H 4 * * 6"
+            schedule: "H 3 * * 6"
         exclude:
         - image_os: centos
     - capm3_periodic_e2e_ephemeral_tests:
@@ -414,4 +414,4 @@
             capm3_version: v1beta1
             capm3_release_branch: main
             bmo_release_branch: main
-            schedule: "H 4 * * *"
+            schedule: "H 3 * * *"
diff --git a/jjb/onap/cps/cps-performance-test-jobs.yaml b/jjb/onap/cps/cps-performance-test-jobs.yaml
index 6676742..4c65fdf 100644
--- a/jjb/onap/cps/cps-performance-test-jobs.yaml
+++ b/jjb/onap/cps/cps-performance-test-jobs.yaml
@@ -24,7 +24,10 @@
     name: cps-performance-test
     project: cps
     project-name: cps
-    timer: "0 */2 * * *"
+
+    # run every hour
+    timer: "0 * * * *"
+
     mvn_params: "-P include-performance"
 
     stream:
@@ -39,7 +42,9 @@
     name: cps-tests-plots
     project: cps
     project-name: cps
-    timer: "0 1-23/2 * * *"
+
+    # run 31 minutes past every hour
+    timer: "31 * * * *"
 
     jobs:
         - 'onap-{project-name}-performance-tests-plots'
@@ -48,7 +53,20 @@
       name: cps-k6-tests
       project: cps
       project-name: cps
-      timer: "15 7 * * *"
+
+      # run 30 minutes past every hour
+      timer: "30 * * * *"
 
       jobs:
           - 'onap-{project-name}-performance-test-k6'
+
+- project:
+    name: cps-k6-tests-plots
+    project: cps
+    project-name: cps
+
+    # run 1 minutes past every hour
+    timer: "1 * * * *"
+
+    jobs:
+        - 'onap-{project-name}-k6-performance-tests-plots'
\ No newline at end of file
diff --git a/jjb/onap/cps/prepare-k6-performance-tests-plots.sh b/jjb/onap/cps/prepare-k6-performance-tests-plots.sh
new file mode 100755
index 0000000..ce85431
--- /dev/null
+++ b/jjb/onap/cps/prepare-k6-performance-tests-plots.sh
@@ -0,0 +1,273 @@
+#!/bin/bash
+#
+# Copyright 2024 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.
+#
+
+set -o errexit  # Exit on most errors
+set -o nounset  # Disallow expansion of unset variables
+set -o pipefail # Use last non-zero exit code in a pipeline
+#set -o xtrace   # Trace logging - disabled to avoid producing gigabytes of logs
+
+#############################################################################################################################
+################################################ F U N C T I O N S ##########################################################
+#############################################################################################################################
+
+# Define the list of "Test Case + Condition" k6 test names to search for in the logs.
+# The Test Case and Condition concatenated with \s* to represent zero or more whitespace characters.
+# Later in this script can use Perl-compatible regular expressions (PCRE) can match to pattern with grep -P flag.
+# The tests which measure http_req_failed excluded since nothing to plot if the rate is always zero.
+k6_test_names=(
+    "1-create-cmhandles.js\s*http_req_duration"
+    "2-wait-for-cmhandles-to-be-ready.js\s*iteration_duration"
+    "3-passthrough-read.js\s*ncmp_overhead"
+    "4-id-search-no-filter.js\s*http_req_duration"
+    "5-search-no-filter.js\s*http_req_duration"
+    "6-id-search-public-property.js\s*http_req_duration"
+    "7-search-public-property.js\s*http_req_duration"
+    "8-id-search-module.js\s*http_req_duration"
+    "9-search-module.js\s*http_req_duration"
+    "10-mixed-load-test.js\s*http_req_duration{scenario:id_search_module}"
+    "10-mixed-load-test.js\s*http_req_duration{scenario:passthrough_read}"
+    "10-mixed-load-test.js\s*http_req_duration{scenario:cm_search_module}"
+    "11-delete-cmhandles.js\s*http_req_duration"
+)
+
+JENKINS_JOB_URL="https://jenkins.nordix.org/job/onap-cps-performance-test-k6"
+
+latestBuildToRecord=""
+consoleText=""
+latestRecordedBuild=""
+timestampOfLatestRecordedBuild=""
+
+# Get last completed build number
+# The number has not been plotted on the graphs yet
+getLastCompletedBuildNumber() {
+  curl -s "${JENKINS_JOB_URL}/lastCompletedBuild/buildNumber"
+}
+
+# Get the last recorded build number from local workspace of the jenkins
+# The number has already been plotted on the graphs
+getLastRecordedBuildNumber() {
+  cd "$WORKSPACE"
+  local file_name="1-create-cmhandles_http_req_duration.txt"
+
+  # Check if the file exists
+  if [ -f "$file_name" ]; then
+    # Get the last line from the file
+    local last_line=$(tail -n 1 "$file_name")
+    local left_side=$(echo "$last_line" | cut -d ',' -f 2)
+    echo "$left_side"
+  else
+    echo "0"
+  fi
+}
+
+# Get all builds numbers
+getAllBuildNumbers() {
+  curl -s "${JENKINS_JOB_URL}/api/json?tree=allBuilds\[id\]" | jq -r '.allBuilds[].id' | sort -n
+}
+
+# Get the console text of k6 performance job
+getConsoleText() {
+  buildToRead=$1
+  consoleURL="${JENKINS_JOB_URL}/${buildToRead}/consoleText"
+  consoleText=$(curl -s "$consoleURL")
+}
+
+# Replace special characters with underscore
+# The return value will be used to create a file for each test combination
+replace_special_characters() {
+  local pattern=".js\s*"
+  local text="$1"
+
+  # Escape special characters in the pattern
+  local escaped_pattern=$(echo "$pattern" | sed 's/[\.*^$]/\\&/g')
+
+  # Replace the pattern with underscores using sed
+  local result=$(echo "$text" | sed "s/$escaped_pattern/_/g")
+
+  echo "$result"
+}
+
+# Get and record the latest k6-job-results with the build number for all tests
+getAndRecordPerformanceJobResultForBuild() {
+  buildNumber="$1"
+  getConsoleText "$buildNumber"
+  # Loop through each test names
+  for k6_test_name in "${k6_test_names[@]}"; do
+    getAndRecordDataResults "$consoleText" "$k6_test_name" "$(replace_special_characters "$k6_test_name").txt" "$buildNumber"
+  done
+}
+
+# Get and record the latest k6-job-results for a single test
+getAndRecordDataResults() {
+  consoleText=$1
+  patternToMatch=$2
+  dataFile=$3
+  buildNumber=$4
+
+  matched_line=""
+  limit_value=""
+  actual=""
+
+  # Find the text combination (Test Case + Condition) in the console log
+  if matched_line=$(echo "$consoleText" | grep -P "${patternToMatch}"); then
+    # Find the first-occurred number in the line matched (limit)
+    limit_value=$(echo "$matched_line" | awk '{for(i=1;i<=NF;i++) if($i ~ /^[0-9]+$/) {print $i; exit}}')
+    # Find the second-occurred number in the line matched (actual)
+    actual=$(echo "$matched_line" | awk '{count=0; for(i=1; i<=NF; i++) if($i ~ /^[0-9]+$/) {count++; if(count==2) {print $i; exit}}}')
+  fi
+
+  # Add a new entry which is a combination of limit, build-number, and actual into related file
+  touch "$dataFile"
+  lastLine=$(tail -n 1 "$dataFile")
+  newLine="$limit_value,$buildNumber,$actual"
+  if [ -z "$actual" ]; then
+    # No entry found for this build, the default added as zero
+    echo "0,$buildNumber,0" >>"$dataFile"
+    recordLatestRecordedBuild "$buildNumber"
+  elif [ "$newLine" == "$lastLine" ]; then
+    # Entry already exists
+    recordLatestRecordedBuild "$buildNumber"
+  else
+    # New entry added to the file
+    echo "$limit_value,$buildNumber,$actual" >>"$dataFile"
+    recordLatestRecordedBuild "$buildNumber"
+  fi
+}
+
+# Format the date and time of the latest build
+recordLatestRecordedBuild() {
+  latestBuildToRecord="$1"
+  timestampOfLatestRecordedBuild=$(curl -s "${JENKINS_JOB_URL}/${latestBuildToRecord}/api/json?tree=timestamp" | jq -r '.timestamp')
+  formattedTimestampOfLatestRecordedBuild=$(date -d "@$((timestampOfLatestRecordedBuild / 1000))" "+%B %e, %Y at %H:%M")
+  latestRecordedBuild=$latestBuildToRecord
+}
+
+# Plot the image (graph) in png format
+buildPlotImage() {
+  dataFile="$1"
+  chartFileName="$2"
+
+  # Read the first line of the file
+  first_line=$(head -n 1 "$dataFile")
+  # Set upper limit of the graphs to %20 to have more space above the plot
+  ten_percent=1.2
+  limit=$(echo "$first_line" | cut -d ',' -f 1)
+  limit=$(expr "$limit * $ten_percent" | bc)
+
+  # Create a temporary Gnuplot script
+  cat <<EOT >gnuplot_script.gp
+set datafile separator ","
+set terminal pngcairo size 1500,600
+set output "${chartFileName}"
+set xlabel "Build"
+set ylabel "Limit (ms)"
+set yrange [0 : ${limit} < *]
+set xtics rotate
+plot '$dataFile' using 2:3:xtic(sprintf("%d", column(2))) with linespoints title "measured", \
+     '$dataFile' using 2:1 with lines linestyle 2 title "limit"
+EOT
+
+  # Run the temporary Gnuplot script
+  gnuplot gnuplot_script.gp
+
+  # Remove the temporary Gnuplot script
+  rm gnuplot_script.gp
+}
+
+# Builds html file
+buildHtmlReport() {
+  # use indirect expansion to get all elements of the array
+  categoryName=("${!1}")
+  reportTitle="$2"
+  outputFile="$3"
+  cat <<EOT >"$outputFile"
+    <!DOCTYPE html>
+    <html>
+    <head>
+    <title>$reportTitle</title>
+    </head>
+    <body>
+      <h1 style="text-align: center;">$reportTitle</h1>
+      <h4>Last updated for performance job build no. $latestRecordedBuild on $formattedTimestampOfLatestRecordedBuild</h4>
+      <table align="center">
+EOT
+# Loop through the tests to generate the HTML rows which consists of the plot-image
+for test_name_in_category in "${categoryName[@]}"; do
+    test_name_in_category="$(replace_special_characters "$test_name_in_category")"
+    cat <<EOF >>"$outputFile"
+        <tr> <!-- Row for $test_name_in_category -->
+            <td align="center" style="padding: 10px;">
+                <figcaption>"$test_name_in_category"</figcaption>
+                <img src="$test_name_in_category.png" width="750" height="300">
+            </td>
+        </tr>
+EOF
+done
+# Close the HTML file
+cat <<EOT >>"$outputFile"
+      </table>
+        <p>The k6 performance tests runs every hour, providing performance metrics to the plots.</p>
+        <p>The k6 plots is being updated 31 minutes past every hour.</p>
+        <p>Successful performance tests job build adds new data, but even if a build fails, existing data is retained.</p>
+    </body>
+  </html>
+EOT
+}
+
+#############################################################################################################################
+################################################ M A I N ####################################################################
+#############################################################################################################################
+
+# Install dependencies
+sudo apt-get install -y bc gnuplot jq
+
+# Download data from CPS performance Jenkins job
+cd "$WORKSPACE"
+if [ -z "$(ls -A)" ]; then
+  # If workspace is empty, pull data from all previous performance job runs
+  for buildNumber in $(getAllBuildNumbers); do
+    getAndRecordPerformanceJobResultForBuild "$buildNumber"
+  done
+else
+  # Append new data from latest jobs run
+  lastCompletedBuildNumber=$(getLastCompletedBuildNumber)
+  lastRecordedBuildNumber=$(getLastRecordedBuildNumber)
+  # Check if last completed build number is greater than last recorded build number
+  if [ "$lastCompletedBuildNumber" -gt "$lastRecordedBuildNumber" ]; then
+    for ((i = lastRecordedBuildNumber + 1; i <= lastCompletedBuildNumber; i++)); do
+      # Process the new builds which hasn't been recorded yet
+      getAndRecordPerformanceJobResultForBuild "$i"
+    done
+  else
+    echo "No new builds to process."
+  fi
+fi
+
+# Limit the plots to last 100 builds for each test
+for k6_test_name in "${k6_test_names[@]}"; do
+  k6_file_name="$(replace_special_characters "$k6_test_name")"
+  tail -n 100 "$k6_file_name.txt" > file.tmp && mv file.tmp "$k6_file_name.txt"
+done
+
+# Plot image files in png format
+for k6_test_name in "${k6_test_names[@]}"; do
+  k6_file_name="$(replace_special_characters "$k6_test_name")"
+  buildPlotImage "$k6_file_name.txt" "$k6_file_name.png"
+done
+
+# Build html page
+buildHtmlReport k6_test_names[@] "k6 tests performance review" "k6TestsPerformanceReview.html"
\ No newline at end of file
diff --git a/jjb/onap/global-templates-onap-java.yaml b/jjb/onap/global-templates-onap-java.yaml
index 78e8974..a54bdce 100644
--- a/jjb/onap/global-templates-onap-java.yaml
+++ b/jjb/onap/global-templates-onap-java.yaml
@@ -179,6 +179,26 @@
       - shell:
           !include-raw-escape: ./cps/k6-performance-tests-trigger.sh
 
+# A job to plot the result of k6 cps performance test
+- job-template:
+    name: 'onap-{project-name}-k6-performance-tests-plots'
+    disabled_job_var: false
+    node: xerces-cps-hw
+    wipe_workspace: false
+
+    triggers:
+      - timed: '{timer}'
+
+    builders:
+      - shell:
+          !include-raw-escape: ./cps/prepare-k6-performance-tests-plots.sh
+
+    publishers:
+      - html-publisher:
+          name: "K6 Performance Review"
+          dir: "."
+          files: "k6TestsPerformanceReview.html"
+
 # A job to perform performance test which are based on Spock-Groovy Framework on cps project
 - job-template:
     name: 'onap-{project-name}-{stream}-performance-test-java'
diff --git a/jjb/oransc/smo-teiv/smo-teiv-push-upstream-jobs.yml b/jjb/oransc/smo-teiv/smo-teiv-push-upstream-jobs.yml
new file mode 100644
index 0000000..71e3d54
--- /dev/null
+++ b/jjb/oransc/smo-teiv/smo-teiv-push-upstream-jobs.yml
@@ -0,0 +1,26 @@
+---
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2024 OpenInfra 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=========================================================
+#
+- project:
+    name: smo-teiv-push-upstream
+    project: smo/teiv
+    project-name: smo-teiv
+
+    jobs:
+      - 'oransc-{project-name}-push-upstream'
\ No newline at end of file
diff --git a/jjb/oransc/smo-teiv/smo-teiv-rebase-jobs.yml b/jjb/oransc/smo-teiv/smo-teiv-rebase-jobs.yml
new file mode 100644
index 0000000..cc65187
--- /dev/null
+++ b/jjb/oransc/smo-teiv/smo-teiv-rebase-jobs.yml
@@ -0,0 +1,26 @@
+---
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2024 OpenInfra 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=========================================================
+#
+- project:
+    name: smo-teiv-rebase
+    project: smo/teiv
+    project-name: smo-teiv
+
+    jobs:
+      - 'oransc-{project-name}-rebase'
\ No newline at end of file
diff --git a/jjb/oransc/smo-teiv/smo-teiv-verify-jobs.yaml b/jjb/oransc/smo-teiv/smo-teiv-verify-jobs.yaml
new file mode 100644
index 0000000..38f2f25
--- /dev/null
+++ b/jjb/oransc/smo-teiv/smo-teiv-verify-jobs.yaml
@@ -0,0 +1,30 @@
+---
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2024 OpenInfra Foundation Europe
+# ================================================================================
+# 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
+# smo-teiv project on Nordix Gerrit.
+
+- project:
+    name: smo-teiv-verify
+    project: smo/teiv
+    project-name: smo-teiv
+    jdk-version: java-17
+
+    jobs:
+      - 'oransc-{project-name}-verify-java'
\ No newline at end of file