Merge "removing unwanted line in voltha-scale-measurements pipeline"
diff --git a/jjb/cord-test/voltha.yaml b/jjb/cord-test/voltha.yaml
index 7d84ef2..b725d38 100644
--- a/jjb/cord-test/voltha.yaml
+++ b/jjb/cord-test/voltha.yaml
@@ -214,6 +214,33 @@
           profile: '1T8GEM'
           pipeline-script: 'voltha-dt-physical-functional-tests.groovy'
 
+
+      # Menlo pod with olt/onu - voltha-2.3  branch,  Default tech profile and timer based job
+      - 'build_voltha_pod_release':
+          build-node: 'menlo-demo-pod'
+          config-pod: 'onf-demo-pod'
+          release: '2.3'
+          branch: 'voltha-2.3'
+          name-extension: '_DT'
+          work-flow: 'DT'
+          test-repo: 'voltha-system-tests'
+          Jenkinsfile: 'Jenkinsfile-voltha-build'
+          oltDebVersion: 'openolt_asfvolt16-2.3.0-bc6e0853e0e8bf6bd7e4223d4a7ee0dd35ce634d.deb'
+          configurePod: true
+          profile: '1T8GEM'
+          time: '7'
+
+      # Menlo pod test job - uses tech profile on voltha branch
+      - 'build_voltha_pod_test':
+          build-node: 'menlo-demo-pod'
+          config-pod: 'onf-demo-pod'
+          release: '2.3'
+          branch: 'voltha-2.3'
+          name-extension: '_DT'
+          test-repo: 'voltha-system-tests'
+          profile: '1T8GEM'
+          pipeline-script: 'voltha-dt-physical-functional-tests.groovy'
+
       # Menlo DEMO-POD - 1 1TCONT 4 4GEMs TechProfile - Manual build and test job
       - 'build_pod_manual':
           build-node: 'menlo-demo-pod'
diff --git a/jjb/pipeline/omec-postmerge.groovy b/jjb/pipeline/omec-postmerge.groovy
index abd983b..9df3600 100644
--- a/jjb/pipeline/omec-postmerge.groovy
+++ b/jjb/pipeline/omec-postmerge.groovy
@@ -21,6 +21,7 @@
 def spgwc_tag = ""
 def spgwu_tag = ""
 def abbreviated_commit_hash = ""
+def quietPeriodTime = 0
 
 pipeline {
 
@@ -65,6 +66,14 @@
             mme_tag = "${branchName}-${abbreviated_commit_hash}"
             break
           }
+          // Add quiet period to downstream job. This is to delay running the
+          // deploy staging job until midnight, so it will not interrupt any
+          // development on the staging cluster during the day.
+          def now = Math.floor((new Date()).getTime() / 1000.0) // Get current time in seconds
+          def PDTOffset = 25200                                 // PDT Offset from UTC in seconds
+          def oneDay = 86400                                    // 24 hours in seconds
+          quietPeriodTime = oneDay - (now - PDTOffset) % oneDay // number of seconds until next midnight
+          println "Quiet Period (seconds until next midnight): " + quietPeriodTime
         }
         build job: "omec-deploy-staging", parameters: [
               string(name: 'hssdb_tag', value: "${hssdb_tag}"),
@@ -72,7 +81,7 @@
               string(name: 'hss_tag', value: "${mme_tag}"),
               string(name: 'spgwc_tag', value: "${spgwc_tag}"),
               string(name: 'spgwu_tag', value: "${spgwu_tag}"),
-            ]
+            ], quietPeriod: quietPeriodTime
       }
     }
   }
diff --git a/jjb/pipeline/voltha-dt-physical-functional-tests.groovy b/jjb/pipeline/voltha-dt-physical-functional-tests.groovy
index 455566a..f086bcc 100644
--- a/jjb/pipeline/voltha-dt-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha-dt-physical-functional-tests.groovy
@@ -56,7 +56,7 @@
           )
         sh returnStdout: false, script: """
         cd voltha
-        git clone -b ${branch} ${cordRepoUrl}/cord-tester
+        git clone -b master ${cordRepoUrl}/cord-tester
         mkdir -p $WORKSPACE/bin
         bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
         cd $WORKSPACE