Ingest onap-lab-ci jjb's

Issue-ID: INT-1215
Change-Id: I448fb7a147daa26d760df6c83fef75aa69f05879
Signed-off-by: Brian Freeman <bf1936@att.com>
diff --git a/deployment/onap-lab-ci/jobs/get-result.sh b/deployment/onap-lab-ci/jobs/get-result.sh
new file mode 100755
index 0000000..7ec39be
--- /dev/null
+++ b/deployment/onap-lab-ci/jobs/get-result.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+JOB=$1
+BUILD=$2
+
+mkdir -p $JOB
+JSON=$JOB/$BUILD.json
+if [ ! -f $JSON ]; then
+    curl -s "http://localhost:8080/jenkins/job/$JOB/$BUILD/api/json" > $JSON
+fi
+
+POD_TO_DELETE=$(jq -r '.actions[] | select(._class == "hudson.model.ParametersAction") | .parameters[] | select(._class == "hudson.model.StringParameterValue") | .value' < $JSON)
+
+TIMESTAMP=$(jq '.timestamp' < $JSON)
+START_TIME=$(date -d @$(($TIMESTAMP/1000)) +%H:%M:%S)
+
+DURATION=$(jq '.duration' < $JSON)
+DURATION_TIME=$(date -ud @$(($DURATION/1000)) +%M:%S)
+
+RESULT=$(jq -r '.result' < $JSON)
+
+echo "|$POD_TO_DELETE|$START_TIME|$DURATION_TIME|$RESULT|[$BUILD|http://onapci.org/logs/$JOB/$BUILD/]|"