VOL-2435 Allow hardware tests to be configured with delay

Change-Id: I52af59a158deeee81b585c9f6229e242f288b3f6
diff --git a/jjb/pipeline/voltha-physical-build-and-tests.groovy b/jjb/pipeline/voltha-physical-build-and-tests.groovy
index 9689bd2..4a028ae 100644
--- a/jjb/pipeline/voltha-physical-build-and-tests.groovy
+++ b/jjb/pipeline/voltha-physical-build-and-tests.groovy
@@ -292,6 +292,16 @@
         """
       }
     }
+
+    stage('After-Test Delay') {
+      steps {
+        sh returnStdout: false, script: """
+        # Note: Gerrit comment text will be prefixed by "Patch set n:" and a blank line
+        REGEX="hardware test with delay\$"
+        [[ "$GERRIT_EVENT_COMMENT_TEXT" =~ \$REGEX ]] && sleep 10m || true
+        """
+      }
+    }
   }
 
   post {
diff --git a/jjb/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index dbeae7e..ab222ac 100644
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -497,6 +497,8 @@
           trigger-on:
             - comment-added-contains-event:
                 comment-contains-value: '^hardware test$'
+            - comment-added-contains-event:
+                comment-contains-value: '^hardware test with delay$'
           projects:
             - project-compare-type: REG_EXP
               project-pattern: '^(voltha-go|voltha-openolt-adapter|voltha-openonu-adapter|voltha-api-server|voltha-system-tests|ofagent-py|voltha-onos)$'