CORD-3073 creating mcord deploy+test job on flex-ocp-mcord pod

Change-Id: Icbd71c6ba6970f0e5e3b96e31a74d3ab8be7b735
diff --git a/jjb/pipeline/mcord-deployment.groovy b/jjb/pipeline/mcord-deployment.groovy
new file mode 100644
index 0000000..d1922b6
--- /dev/null
+++ b/jjb/pipeline/mcord-deployment.groovy
@@ -0,0 +1,65 @@
+/* mcord-in-a-box 6.0 pipeline build and test*/
+
+pipeline {
+
+  /* no label, executor is determined by JJB */
+  agent {
+    label "${params.executorNode}"
+  }
+
+  stages {
+
+    stage ('Checkout Automation-Tools Repo') {
+      steps {
+        sh '''
+            pushd $WORKSPACE
+            git clone https://gerrit.opencord.org/automation-tools
+            popd
+            '''
+            }
+        }
+
+    stage ('Install MCORD') {
+      steps {
+        sh '''
+            pushd $WORKSPACE
+            ./automation-tools/mcord/mcord-in-a-box.sh
+            popd
+            '''
+            }
+        }
+
+    stage ('Test MCORD') {
+      steps {
+        sh '''
+            pushd $WORKSPACE
+            git clone https://gerrit.opencord.org/mcord
+            cd mcord/test
+            ansible-playbook -i localhost, mcord-cavium-test-playbook.yml
+            popd
+            '''
+            }
+        }
+    }
+
+    post {
+        always {
+            sh '''
+                pushd $WORKSPACE
+                kubectl get pods --all-namespaces
+                if [ -x "/usr/bin/helm" ]; then
+                    helm list
+                    helm delete --purge xos-core
+                    helm delete --purge mcord
+                    helm delete --purge base-openstack
+                    helm reset --force
+                fi
+                if [ -x "/usr/bin/kubelet" ]; then
+                    sudo rm /usr/bin/kubelet
+                fi
+                popd
+                '''
+            step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "${notificationEmail}", sendToIndividuals: false])
+     }
+    }
+}