[CORD-3256] Generate TT/TP community test job.

jjb/voltha-test/voltha.yaml
jjb/voltha-test/voltha-nightly-jobs.yaml
----------------------------------------
  - First attempt at cloning a voltha pipeline job from DT to TT.
  - Add a few placeholders for future work to split yaml configs
    into a more modular setup.

Makefile
config.mk
makefiles/lint/groovy.mk
makefiles/lint/yaml.mk
makefiles/virtualenv.mk
------------------------
  - Copy in makefile libraries from repo::voltha-docs.
  - lint/yaml and lint/groovy.

Misc / Fixes
------------
  - Fixed colorization in tree output.
  - Comment out jjb import in requirements.txt, Makefile still configured to use an older version.
  - Move README.md outside jjb/ lf-env scripts blindly grep for error patterns beneath jjb/

Change-Id: I36e304f6ca9d54dc26fa5d36b17373cbb00f5afd
diff --git a/makefiles/lint/json.mk b/makefiles/lint/json.mk
index 81a87da..1deeaba 100644
--- a/makefiles/lint/json.mk
+++ b/makefiles/lint/json.mk
@@ -2,7 +2,7 @@
 # -----------------------------------------------------------------------
 # Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
 #
-# Licensed under the Apache License, Version 2.0 (the "License");
+# 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
 #
@@ -15,24 +15,78 @@
 # limitations under the License.
 # -----------------------------------------------------------------------
 
-JSON_FILES ?= $(error JSON_FILES= is rqeuired)
+$(if $(DEBUG),$(warning ENTER))
 
-.PHONY: lint-json
+##-------------------##
+##---]  GLOBALS  [---##
+##-------------------##
+.PHONY: lint-json lint-json-all lint-json-modified
 
-lint : lint-json
+have-json-files := $(if $(strip $(JSON_FILES)),true)
+JSON_FILES      ?= $(error JSON_FILES= required)
 
 ## -----------------------------------------------------------------------
-## TODO: Simplify -- replace with jq -e to avoid venv dependency
+## Intent: Use the json command to perform syntax checking.
+##   o If UNSTABLE=1 syntax check all sources
+##   o else only check sources modified by the developer.
+## Usage:
+##   % make lint UNSTABLE=1
+##   % make lint-json-all
 ## -----------------------------------------------------------------------
-lint-json: vst_venv
-	source ./$</bin/activate \
-	    ; set -u \
-	    ; for jsonfile in $(JSON_FILES); do \
-		echo "Validating json file: $$jsonfile" ;\
-		python -m json.tool $$jsonfile > /dev/null ;\
-	done
+ifndef NO-LINT-JSON
+  lint-json-mode := $(if $(have-json-files),modified,all)
+  lint : lint-json-$(lint-json-mode)
+endif# NO-LINT-JSON
 
+## -----------------------------------------------------------------------
+## Intent: exhaustive json syntax checking
+## -----------------------------------------------------------------------
+json-find-args := $(null)
+json-find-args += -name '$(venv-name)'
+lint-json-all:	
+	$(HIDE)$(MAKE) --no-print-directory lint-json-install
+
+	$(activate)\
+ && find . \( $(json-find-args) \) -prune -o -name '*.json' -print0 \
+	| $(xargs-n1) python -m json.tool > /dev/null ;\
+
+## -----------------------------------------------------------------------
+## Intent: check deps for format and python3 cleanliness
+## Note:
+##   json --py3k option no longer supported
+## -----------------------------------------------------------------------
+lint-json-modified: $(venv-activate-script)
+	$(HIDE)$(MAKE) --no-print-directory lint-json-install
+
+	$(activate)\
+ && for jsonfile in $(JSON_FILES); do \
+        echo "Validating json file: $$jsonfile" ;\
+        python -m json.tool $$jsonfile > /dev/null ;\
+    done
+
+## -----------------------------------------------------------------------
+## Intent:
+## -----------------------------------------------------------------------
+.PHONY: lint-json-install
+lint-json-install: $(venv-activate-script)
+	@echo
+	@echo "** -----------------------------------------------------------------------"
+	@echo "** json syntax checking"
+	@echo "** -----------------------------------------------------------------------"
+#	$(activate) && pip install --upgrade json.tool
+#       $(activate) && python -m json.tool --version (?-howto-?)
+	@echo
+
+## -----------------------------------------------------------------------
+## Intent: Display command usage
+## -----------------------------------------------------------------------
 help::
-	@echo "  lint-json            Syntax check json sources"
+	@echo '  lint-json          Syntax check python using the json command'
+  ifdef VERBOSE
+	@echo '  lint-json-all       json checking: exhaustive'
+	@echo '  lint-json-modified  json checking: only modified'
+  endif
+
+$(if $(DEBUG),$(warning LEAVE))
 
 # [EOF]