[CORD-2848] Add helm-lint job

Change-Id: I7d379e417d178b033008639e02516b5e16b33c36
diff --git a/jjb/cord/cord-xos-gui-unit.yaml b/jjb/cord/cord-xos-gui-unit.yaml
index 50885ab..f51e863 100644
--- a/jjb/cord/cord-xos-gui-unit.yaml
+++ b/jjb/cord/cord-xos-gui-unit.yaml
@@ -89,13 +89,16 @@
     project: xos-gui
 
     build-timeout: '10'
-    build-node: 'ubuntu16.04-basebuild-1c-1g'
+    build-node: '{build-node}'
 
-    stream:
+    # ideally this would be in defaults.yaml, but that doesn't work
+    supported_versions: &supported_versions
       - 'master'
       - 'cord-5.0'
       - 'cord-4.1'
       - 'cord-4.0'
 
+    stream: *supported_versions
+
     jobs:
       - 'cord-xos-gui-unit-{stream}'
diff --git a/jjb/defaults.yaml b/jjb/defaults.yaml
index aeb339d..f48a77e 100644
--- a/jjb/defaults.yaml
+++ b/jjb/defaults.yaml
@@ -16,6 +16,7 @@
     # Timeout in minutes
     # TODO deprecate this (should be project template specific)
     build-timeout: 360
+
     # TODO this should be the most common executor
     build-node: ubuntu16.04-basebuild-1c-1g
 
@@ -39,3 +40,4 @@
         -Djenkins
         -Dmaven.repo.local=/tmp/r
         -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
+
diff --git a/jjb/helm-lint/helmlint.sh b/jjb/helm-lint/helmlint.sh
new file mode 100755
index 0000000..629bb34
--- /dev/null
+++ b/jjb/helm-lint/helmlint.sh
@@ -0,0 +1,46 @@
+#/usr/bin/env bash
+
+# Copyright 2018-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.
+
+# helmlint.sh
+# run `helm lint` on all helm charts that are found
+
+set +e -u -o pipefail
+echo "helmlint.sh, using helm version: $(helm version -c --short)"
+
+fail_lint=0
+
+for chart in $(find . -name Chart.yaml -print) ; do
+
+  chartdir=$(dirname "${chart}")
+
+  # lint with values.yaml if it exists
+  if [ -f "${chartdir}/values.yaml" ]; then
+    helm lint --strict --values "${chartdir}/values.yaml" "${chartdir}"
+  else
+    helm lint --strict "${chartdir}"
+  fi
+
+  rc=$?
+  if [[ $rc != 0 ]]; then
+    fail_lint=1
+  fi
+done
+
+if [[ $fail_lint != 0 ]]; then
+  exit 1
+fi
+
+exit 0
diff --git a/jjb/helm-lint/heml-lint.yml b/jjb/helm-lint/heml-lint.yml
new file mode 100644
index 0000000..1f5e37a
--- /dev/null
+++ b/jjb/helm-lint/heml-lint.yml
@@ -0,0 +1,72 @@
+---
+# run `helm lint` on helm charts
+
+- job-template:
+    name: 'verify-helm-charts-{stream}'
+
+    git-url: '$GIT_URL/$GERRIT_PROJECT'
+    submodule-recursive: false
+
+    builders:
+      - shell: !include-raw-escape: helmlint.sh
+
+    properties:
+      - lf-infra-properties:
+          project: '{project}'
+          build-days-to-keep: '{build-days-to-keep}'
+
+    parameters:
+      - lf-infra-parameters:
+          project: '{project}'
+          branch: '{stream}'
+          stream: '{stream}'
+          lftools-version: '{lftools-version}'
+
+    wrappers:
+      - lf-infra-wrappers:
+          build-timeout: '{build-timeout}'
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+    scm:
+      - lf-infra-gerrit-scm:
+          git-url: '{git-url}'
+          refspec: '$GERRIT_REFSPEC'
+          branch: '$GERRIT_BRANCH'
+          submodule-recursive: '{submodule-recursive}'
+          choosing-strategy: gerrit
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+    triggers:
+      - gerrit:
+          server-name: '{gerrit-server-name}'
+          trigger-on:
+            - patchset-created-event:
+                exclude-drafts: true
+                exclude-trivial-rebase: false
+                exclude-no-code-change: true
+            - draft-published-event
+            - comment-added-contains-event:
+                comment-contains-value: '(?i)^.*recheck$'
+          projects:
+            - project-compare-type: PLAIN
+              project-pattern: '{project}'
+              branches:
+                - branch-compare-type: ANT
+                  branch-pattern: '**/{stream}'
+
+- project:
+    name: verify-helm-charts
+    project-name: verify-helm-charts
+
+    project: helm-charts
+
+    project-type: freestyle
+
+    build-timeout: '10'
+    build-node: '{build-node}'
+
+    stream:
+      - "master"
+
+    jobs:
+      - 'verify-helm-charts-{stream}'