Temporarily change periodic job schedule for bbsim from 11pm to every
30 minutes.  Let's see if job triggered by timer will checkout latest
jenkins shared library from branch=master.

Change-Id: I4e43b71882066239389a417d8afcf7e005033a4f
diff --git a/.wip/periodic-voltha-multiple-olts-pm-data-test-bbsim/TODO b/.wip/periodic-voltha-multiple-olts-pm-data-test-bbsim/TODO
deleted file mode 100644
index 6c9e3c1..0000000
--- a/.wip/periodic-voltha-multiple-olts-pm-data-test-bbsim/TODO
+++ /dev/null
@@ -1 +0,0 @@
-Verify *-test-bbsim-2.12  matches the view pattern (voltha)?-2\.\d\d$
\ No newline at end of file
diff --git a/.wip/periodic-voltha-pm-data-test-bbsim-2.8/description b/.wip/periodic-voltha-pm-data-test-bbsim-2.8/description
deleted file mode 100644
index de7f6e0..0000000
--- a/.wip/periodic-voltha-pm-data-test-bbsim-2.8/description
+++ /dev/null
@@ -1,4 +0,0 @@
-<!-- Managed by Jenkins Job Builder -->
-Created by voltha-periodic-test job-template from ci-management/jjb/voltha-e2e.yaml  <br /><br />
-E2E Validation for Voltha 2.X
-<!-- Managed by Jenkins Job Builder -->
diff --git a/.wip/periodic-voltha-pm-data-test-bbsim-2.8/paths b/.wip/periodic-voltha-pm-data-test-bbsim-2.8/paths
deleted file mode 100644
index 00b7db6..0000000
--- a/.wip/periodic-voltha-pm-data-test-bbsim-2.8/paths
+++ /dev/null
@@ -1,2 +0,0 @@
-jjb/software-upgrades.yaml
-jjb/voltha-e2e.yaml
diff --git a/.wip/periodic-voltha-pm-data-test-bbsim-2.8/pipeline b/.wip/periodic-voltha-pm-data-test-bbsim-2.8/pipeline
deleted file mode 100644
index 39d2dae..0000000
--- a/.wip/periodic-voltha-pm-data-test-bbsim-2.8/pipeline
+++ /dev/null
@@ -1,283 +0,0 @@
-// Copyright 2021-2023 Open Networking Foundation (ONF) and the ONF Contributors
-//
-// 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.
-
-// voltha-2.x e2e tests for openonu-go
-// uses bbsim to simulate OLT/ONUs
-
-library identifier: 'cord-jenkins-libraries@master',
-    retriever: modernSCM([
-      $class: 'GitSCMSource',
-      remote: 'https://gerrit.opencord.org/ci-management.git'
-])
-
-def clusterName = "kind-ci"
-
-def execute_test(testTarget, workflow, testLogging, teardown, testSpecificHelmFlags = "") {
-    def infraNamespace = "default"
-    def volthaNamespace = "voltha"
-    def logsDir = "$WORKSPACE/${testTarget}"
-
-    stage('IAM')
-    {
-	script
-	{
-	    String iam = [
-		'ci-management',
-		'jjb',
-		'pipeline',
-		'voltha',
-		'voltha-2.8',
-		'bbsim-tests.groovy'
-	    ].join('/')
-            println("** ${iam}: ENTER")
-            println("** ${iam}: LEAVE")
-	}
-    }
-
-    stage('Cleanup') {
-    if (teardown) {
-      timeout(15) {
-        script {
-          helmTeardown(["default", infraNamespace, volthaNamespace])
-        }
-        timeout(1) {
-          sh returnStdout: false, script: '''
-          # remove orphaned port-forward from different namespaces
-          ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9 || true
-          '''
-        }
-      }
-    }
-  }
-  stage('Deploy Voltha') {
-    if (teardown) {
-      timeout(10) {
-        script {
-
-          sh """
-          mkdir -p ${logsDir}
-          _TAG=kail-startup kail -n ${infraNamespace} -n ${volthaNamespace} > ${logsDir}/onos-voltha-startup-combined.log &
-          """
-
-          // if we're downloading a voltha-helm-charts patch, then install from a local copy of the charts
-          def localCharts = false
-          if (gerritProject == "voltha-helm-charts" || branch != "master") {
-            localCharts = true
-          }
-
-          // NOTE temporary workaround expose ONOS node ports
-          def localHelmFlags = extraHelmFlags.trim() + " --set global.log_level=${logLevel.toUpperCase()} " +
-          " --set onos-classic.onosSshPort=30115 " +
-          " --set onos-classic.onosApiPort=30120 " +
-          " --set onos-classic.onosOfPort=31653 " +
-          " --set onos-classic.individualOpenFlowNodePorts=true " + testSpecificHelmFlags
-
-          if (gerritProject != "") {
-            localHelmFlags = "${localHelmFlags} " + getVolthaImageFlags("${gerritProject}")
-          }
-
-          volthaDeploy([
-            infraNamespace: infraNamespace,
-            volthaNamespace: volthaNamespace,
-            workflow: workflow.toLowerCase(),
-            extraHelmFlags: localHelmFlags,
-            localCharts: localCharts,
-            bbsimReplica: olts.toInteger(),
-            dockerRegistry: registry,
-            ])
-        }
-
-        // stop logging
-        sh """
-          P_IDS="\$(ps e -ww -A | grep "_TAG=kail-startup" | grep -v grep | awk '{print \$1}')"
-          if [ -n "\$P_IDS" ]; then
-            echo \$P_IDS
-            for P_ID in \$P_IDS; do
-              kill -9 \$P_ID
-            done
-          fi
-          cd ${logsDir}
-          gzip -k onos-voltha-startup-combined.log
-          rm onos-voltha-startup-combined.log
-        """
-      }
-      sh """
-      JENKINS_NODE_COOKIE="dontKillMe" _TAG="voltha-voltha-api" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${volthaNamespace} svc/voltha-voltha-api 55555:55555; done"&
-      JENKINS_NODE_COOKIE="dontKillMe" _TAG="voltha-infra-etcd" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${infraNamespace} svc/voltha-infra-etcd 2379:2379; done"&
-      JENKINS_NODE_COOKIE="dontKillMe" _TAG="voltha-infra-kafka" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${infraNamespace} svc/voltha-infra-kafka 9092:9092; done"&
-      bbsimDmiPortFwd=50075
-      for i in {0..${olts.toInteger() - 1}}; do
-        JENKINS_NODE_COOKIE="dontKillMe" _TAG="bbsim\${i}" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${volthaNamespace} svc/bbsim\${i} \${bbsimDmiPortFwd}:50075; done"&
-        ((bbsimDmiPortFwd++))
-      done
-      ps aux | grep port-forward
-      """
-    }
-  }
-  stage('Run test ' + testTarget + ' on ' + workflow + ' workFlow') {
-    sh """
-    mkdir -p ${logsDir}
-    export ROBOT_MISC_ARGS="-d ${logsDir} "
-    ROBOT_MISC_ARGS+="-v ONOS_SSH_PORT:30115 -v ONOS_REST_PORT:30120 -v INFRA_NAMESPACE:${infraNamespace} -v container_log_dir:${logsDir} -v logging:${testLogging}"
-    export KVSTOREPREFIX=voltha/voltha_voltha
-
-    make -C $WORKSPACE/voltha-system-tests ${testTarget} || true
-    """
-    getPodsInfo("${logsDir}")
-    sh """
-      set +e
-      # collect logs collected in the Robot Framework StartLogging keyword
-      cd ${logsDir}
-      gzip *-combined.log || true
-      rm *-combined.log || true
-    """
-  }
-}
-
-def collectArtifacts(exitStatus) {
-  getPodsInfo("$WORKSPACE/${exitStatus}")
-  sh """
-  kubectl logs -n voltha -l app.kubernetes.io/part-of=voltha > $WORKSPACE/${exitStatus}/voltha.log || true
-git   """
-  archiveArtifacts artifacts: '**/*.log,**/*.gz,**/*.txt,**/*.html'
-  sh '''
-    sync
-    pkill kail || true
-    which voltctl
-    md5sum $(which voltctl)
-  '''
-  step([$class: 'RobotPublisher',
-    disableArchiveOutput: false,
-    logFileName: "**/*/log*.html",
-    otherFiles: '',
-    outputFileName: "**/*/output*.xml",
-    outputPath: '.',
-    passThreshold: 100,
-    reportFileName: "**/*/report*.html",
-    unstableThreshold: 0,
-    onlyCritical: true]);
-}
-
-pipeline {
-
-  /* no label, executor is determined by JJB */
-  agent {
-    label "${params.buildNode}"
-  }
-  options {
-    timeout(time: "${timeout}", unit: 'MINUTES')
-  }
-  environment {
-    KUBECONFIG="$HOME/.kube/kind-${clusterName}"
-    VOLTCONFIG="$HOME/.volt/config"
-    PATH="$PATH:$WORKSPACE/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
-    ROBOT_MISC_ARGS="-e PowerSwitch ${params.extraRobotArgs}"
-    DIAGS_PROFILE="VOLTHA_PROFILE"
-  }
-  stages {
-    stage('Download Code') {
-      steps {
-        getVolthaCode([
-          branch: "${branch}",
-          gerritProject: "${gerritProject}",
-          gerritRefspec: "${gerritRefspec}",
-          volthaSystemTestsChange: "${volthaSystemTestsChange}",
-          volthaHelmChartsChange: "${volthaHelmChartsChange}",
-        ])
-      }
-    }
-    stage('Build patch') {
-      // build the patch only if gerritProject is specified
-      when {
-        expression {
-          return !gerritProject.isEmpty()
-        }
-      }
-      steps {
-        // NOTE that the correct patch has already been checked out
-        // during the getVolthaCode step
-        buildVolthaComponent("${gerritProject}")
-      }
-    }
-    stage('Create K8s Cluster') {
-      steps {
-        script {
-          def clusterExists = sh returnStdout: true, script: """
-          kind get clusters | grep ${clusterName} | wc -l
-          """
-          if (clusterExists.trim() == "0") {
-            createKubernetesCluster([branch: "${branch}", nodes: 3, name: clusterName])
-          }
-        }
-      }
-    }
-    stage('Replace voltctl') {
-      // if the project is voltctl override the downloaded one with the built one
-      when {
-        expression {
-          return gerritProject == "voltctl"
-        }
-      }
-      steps{
-        sh """
-        mv `ls $WORKSPACE/voltctl/release/voltctl-*-linux-amd*` $WORKSPACE/bin/voltctl
-        chmod +x $WORKSPACE/bin/voltctl
-        """
-      }
-    }
-    stage('Load image in kind nodes') {
-      when {
-        expression {
-          return !gerritProject.isEmpty()
-        }
-      }
-      steps {
-        loadToKind()
-      }
-    }
-    stage('Parse and execute tests') {
-        steps {
-          script {
-            def tests = readYaml text: testTargets
-
-            for(int i = 0;i<tests.size();i++) {
-              def test = tests[i]
-              def target = test["target"]
-              def workflow = test["workflow"]
-              def flags = test["flags"]
-              def teardown = test["teardown"].toBoolean()
-              def logging = test["logging"].toBoolean()
-              def testLogging = 'False'
-              if (logging) {
-                  testLogging = 'True'
-              }
-              println "Executing test ${target} on workflow ${workflow} with logging ${testLogging} and extra flags ${flags}"
-              execute_test(target, workflow, testLogging, teardown, flags)
-            }
-          }
-        }
-    }
-  }
-  post {
-    aborted {
-      collectArtifacts("aborted")
-    }
-    failure {
-      collectArtifacts("failed")
-    }
-    always {
-      collectArtifacts("always")
-    }
-  }
-}
diff --git a/.wip/periodic-voltha-pm-data-test-bbsim-2.8/todo b/.wip/periodic-voltha-pm-data-test-bbsim-2.8/todo
deleted file mode 100644
index 548769c..0000000
--- a/.wip/periodic-voltha-pm-data-test-bbsim-2.8/todo
+++ /dev/null
@@ -1,28 +0,0 @@
-# TODO:
-#   o Verify periodic job has been disabled
-
-#   o [x] Delete job defined in voltha-e2e.yaml (master)
-#     - Deleted, verify voltha-e2e/master.yaml launched as job
-#     - Delete intermediate job periodic-voltha-pm-data-test-bbsim-master
-
-#   o Create voltha-e2e/voltha-2.12.yaml
-
-#   o Delete job defined in voltha-e2e.yaml (v2.11)
-#     - Deleted, verify voltha-e2e/master.yaml launched as job
-#     - Delete intermediate job periodic-voltha-pm-data-test-bbsim-master
-
-#   o rename bbsim-2.8-playground to bbsim-2.8
-# [Intermediate Jobs]
-#   o Delete pipeline job periodic-voltha-pm-data-test-bbsim-2.8-playground
-
-#   o Once all jobs verified delete commented entries from voltha-e2e.yaml
-
-https://jenkins.opencord.org/job/periodic-voltha-pm-data-test-bbsim-2.8/
-  Verify periodic job has been disabled.
-
-ci-management/jjb/voltha-e2e.yam
-  name: 'periodic-voltha-pm-data-test-bbsim-2.8'
-
-ci-management/jjb/voltha-e2e/voltha-2.8.yaml
-  name: 'periodic-voltha-pm-data-test-bbsim-2.8-playground'
-
diff --git a/.wip/periodic-voltha-pm-data-test-bbsim-2.8/urls b/.wip/periodic-voltha-pm-data-test-bbsim-2.8/urls
deleted file mode 100644
index eb31e05..0000000
--- a/.wip/periodic-voltha-pm-data-test-bbsim-2.8/urls
+++ /dev/null
@@ -1 +0,0 @@
-https://jenkins.opencord.org/job/periodic-voltha-pm-data-test-bbsim-2.8/configure
diff --git a/.wip/periodic-voltha-pm-data-test-bbsim-2.8/vars b/.wip/periodic-voltha-pm-data-test-bbsim-2.8/vars
deleted file mode 100644
index ad67756..0000000
--- a/.wip/periodic-voltha-pm-data-test-bbsim-2.8/vars
+++ /dev/null
@@ -1,5 +0,0 @@
-jjb/pipeline/voltha/master/bbsim-tests.groovy
-jjb/pipeline/voltha/playground/bbsim-tests.groovy
-jjb/pipeline/voltha/voltha-2.11/bbsim-tests.groovy
-jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy
-jjb/pipeline/voltha/voltha-2.8/bbsim-tests.groovy
diff --git a/jjb/voltha-e2e/master.yaml b/jjb/voltha-e2e/master.yaml
index 9754c28..4cafdb6 100644
--- a/jjb/voltha-e2e/master.yaml
+++ b/jjb/voltha-e2e/master.yaml
@@ -74,7 +74,8 @@
           name: 'periodic-voltha-test-bbsim'
           code-branch: 'master'
           extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master --set onos-classic.replicas=3,onos-classic.atomix.replicas=3 --set voltha.onos_classic.replicas=3 '
-          time-trigger: "H H/23 * * *"
+#          time-trigger: "H H/23 * * *"       # Build daily at 11pm
+          time-trigger: "H/30 * * * *"        # Build every 30 min
           testTargets: |
             - target: functional-single-kind
               workflow: att