diff --git a/jjb/pipeline/xos-core.groovy b/jjb/pipeline/xos-core.groovy
new file mode 100644
index 0000000..478f790
--- /dev/null
+++ b/jjb/pipeline/xos-core.groovy
@@ -0,0 +1,170 @@
+// Copyright 2017-present Open Networking Foundation
+//
+// 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.
+
+// chart-api-test-helm.groovy
+// Checks functionality of the helm-chart, without overriding the version/tag used
+
+pipeline {
+
+  /* no label, executor is determined by JJB */
+  agent {
+    label "${params.executorNode}"
+  }
+
+  stages {
+
+    stage('repo') {
+      steps {
+        checkout(changelog: false, \
+          poll: false,
+          scm: [$class: 'RepoScm', \
+            manifestRepositoryUrl: "${params.manifestUrl}", \
+            manifestBranch: "${params.manifestBranch}", \
+            currentBranch: true, \
+            destinationDir: 'cord', \
+            forceSync: true,
+            resetFirst: true, \
+            quiet: true, \
+            jobs: 4, \
+            showAllChanges: true] \
+          )
+      }
+    }
+
+    stage('minikube') {
+      steps {
+        /* see https://github.com/kubernetes/minikube/#linux-continuous-integration-without-vm-support */
+        sh '''
+           export MINIKUBE_WANTUPDATENOTIFICATION=false
+           export MINIKUBE_WANTREPORTERRORPROMPT=false
+           export CHANGE_MINIKUBE_NONE_USER=true
+           export MINIKUBE_HOME=$HOME
+           mkdir -p $HOME/.kube || true
+           touch $HOME/.kube/config
+           export KUBECONFIG=$HOME/.kube/config
+           sudo -E /usr/bin/minikube start --vm-driver=none
+           '''
+        script {
+          timeout(3) {
+            waitUntil {
+              sleep 5
+              def kc_ret = sh script: "kubectl get po", returnStatus: true
+              return (kc_ret == 0);
+            }
+          }
+        }
+      }
+    }
+
+    stage('helm') {
+      steps {
+        sh '''
+           helm init
+           sleep 60
+           helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
+           '''
+      }
+    }
+
+    stage ('Build XOS Core and TestService') {
+      steps {
+        sh """
+           #!/usr/bin/env bash
+           set -eu -o pipefail
+
+           sudo service docker restart
+           cd $WORKSPACE/cord/orchestration/xos/containers/xos
+           make build
+           cd $WORKSPACE/cord/orchestration/xos/testservice
+           docker build --no-cache -t xosproject/testservice-synchronizer:candidate -f Dockerfile.synchronizer .
+           """
+      }
+    }
+
+    stage('Install XOS w/TestService') {
+      steps {
+        sh """
+           #!/usr/bin/env bash
+           set -eu -o pipefail
+
+           pushd cord/helm-charts
+           helm dep update xos-core
+           helm install --set images.xos_core.tag=candidate,images.xos_core.pullPolicy=Never xos-core -n xos-core
+
+           git clone https://gerrit.opencord.org/helm-repo-tools
+           helm-repo-tools/wait_for_pods.sh
+
+           #install testservice
+           cd $WORKSPACE/cord/orchestration/xos/testservice
+           helm install -f testservice-devel.yaml testservice -n testservice
+           popd
+           """
+      }
+    }
+    stage('Wait for Core') {
+      steps {
+        sh """
+           #wait for xos-core and models to be loaded
+           timeout 300 bash -c "until http -a admin@opencord.org:letmein GET http://127.0.0.1:30001/xosapi/v1/core/sites |jq '.items[0].name'|grep -q mysite; do echo 'Waiting for API To be up'; sleep 10; done"
+           """
+      }
+    }
+    stage('Test Core') {
+      steps {
+        sh """
+           #!/usr/bin/env bash
+           set -eu -o pipefail
+           pushd cord/test/cord-tester/src/test/cord-api/
+           source setup_venv.sh
+           cd Tests/xos-test-service
+           robot -e notready test-service.robot || true
+           popd
+           """
+      }
+    }
+  }
+  post {
+    always {
+      sh """
+         kubectl get pods --all-namespaces
+
+         # copy robot logs
+         if [ -d RobotLogs ]; then rm -r RobotLogs; fi; mkdir RobotLogs
+         cp -r $WORKSPACE/cord/test/cord-tester/src/test/cord-api/Tests/xos-test-service/Log/*ml ./RobotLogs
+         echo "# removing helm deployments"
+         kubectl get pods
+         helm list
+
+         for hchart in \$(helm list -q);
+         do
+           echo "## Purging chart: \${hchart} ##"
+           helm delete --purge "\${hchart}"
+         done
+
+         sudo minikube delete
+         """
+         step([$class: 'RobotPublisher',
+            disableArchiveOutput: false,
+            logFileName: 'RobotLogs/log*.html',
+            otherFiles: '',
+            outputFileName: 'RobotLogs/output*.xml',
+            outputPath: '.',
+            passThreshold: 100,
+            reportFileName: 'RobotLogs/report*.html',
+            unstableThreshold: 0]);
+         step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "kailash@opennetworking.org, teo@opennetworking.org", sendToIndividuals: false])
+
+    }
+  }
+}
