Merge "[CORD-2848] Add helm-lint job"
diff --git a/.gitignore b/.gitignore
index 11b529f..f07503c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,4 +29,7 @@
 __pycache__/
 *.pyc
 
-onap_sandbox
+# jjb local testing
+venv-jjb
+job-configs
+
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ab690d9
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+# Makefile for testing JJB jobs in a virtualenv
+
+.PHONY: test clean
+
+VENV_DIR      ?= venv-jjb
+JJB_VERSION   ?= 2.0.0
+JOBCONFIG_DIR ?= job-configs
+
+$(VENV_DIR):
+	@echo "Setting up virtualenv for JJB testing"
+	virtualenv $@
+	$@/bin/pip install jenkins-job-builder==$(JJB_VERSION) pipdeptree
+
+$(JOBCONFIG_DIR):
+	mkdir $@
+
+test: $(VENV_DIR) $(JOBCONFIG_DIR)
+	source $(VENV_DIR)/bin/activate ; \
+	pipdeptree ; \
+	jenkins-jobs -l DEBUG test --recursive -o $(JOBCONFIG_DIR) jjb/ ;
+
+clean:
+	rm -rf $(VENV_DIR) $(JOBCONFIG_DIR)
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..30d7499
--- /dev/null
+++ b/README.md
@@ -0,0 +1,27 @@
+# ci-management for CORD
+
+This repo holds configuration for the Jenkins testing infrastructure used by
+CORD.
+
+The best way to work with this repo is to check it out with `repo`, per these
+instructions: [Downloading testing and QA
+repositories](https://guide.opencord.org/getting_the_code.html#downloading-testing-and-qa-repositories)
+
+> NOTE: This repo uses git submodules. If you have trouble with the tests or
+> other tasks, please run: `git submodule init && git submodule update` to
+> obtain these submodules, as `repo` won't do this automatically for you.
+
+## Testing job definitions
+
+[Documentation for Jenkins Job Builder
+(JJB)](https://docs.openstack.org/infra/jenkins-job-builder/index.html)
+
+JJB job definitions can be tested by running:
+
+```shell
+make test
+```
+
+Which will create a python virtualenv, install jenkins-job-builder in it, then
+try building all the job files.
+
diff --git a/packer/provision/basebuild.sh b/packer/provision/basebuild.sh
index cc3eb14..8aa89f0 100644
--- a/packer/provision/basebuild.sh
+++ b/packer/provision/basebuild.sh
@@ -109,6 +109,18 @@
     mv sonar-scanner-${SONAR_SCANNER_CLI_VERSION}-linux sonar-scanner
     popd
 
+    # install helm (for lint)
+    HELM_VERSION="2.8.2"
+    HELM_SHA256SUM="614b5ac79de4336b37c9b26d528c6f2b94ee6ccacb94b0f4b8d9583a8dd122d3"
+    HELM_PLATFORM="linux-amd64"
+    curl -L -o /tmp/helm.tgz https://storage.googleapis.com/kubernetes-helm/helm-v${HELM_VERSION}-${HELM_PLATFORM}.tar.gz
+    echo "$HELM_SHA256SUM  /tmp/helm.tgz" | sha256sum -c -
+    pushd /tmp
+    tar -xzvf helm.tgz
+    mv ${HELM_PLATFORM}/helm /usr/local/bin/helm
+    chmod a+x /usr/local/bin/helm
+    popd
+
     # clean up
     apt-get clean
     apt-get purge -y
@@ -116,6 +128,7 @@
     rm -rf /var/lib/apt/lists/*
     rm -rf /var/cache/oracle-jdk8-installer
     rm -rf /tmp/sonarscanner.zip
+    rm -rf /tmp/helm.tgz
 }
 
 all_systems() {