[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/yaml.mk b/makefiles/lint/yaml.mk
index b60e616..566ac18 100644
--- a/makefiles/lint/yaml.mk
+++ b/makefiles/lint/yaml.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,18 +15,68 @@
# limitations under the License.
# -----------------------------------------------------------------------
-YAML_FILES ?= $(error YAML_FILES= is required)
+$(if $(DEBUG),$(warning ENTER))
-.PHONY: lint-yaml
+##-------------------##
+##---] GLOBALS [---##
+##-------------------##
+.PHONY: lint-yaml lint-yaml-all lint-yaml-modified
-lint : lint-yaml
+have-yaml-files := $(if $(strip $(YAML_FILES)),true)
+YAML_FILES ?= $(error YAML_FILES= is required)
-lint-yaml: vst_venv
- source ./$</bin/activate \
- ; set -u \
- ; yamllint -s $(YAML_FILES)
+## -----------------------------------------------------------------------
+## Intent: Use the yaml 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-yaml-all
+## -----------------------------------------------------------------------
+ifndef NO-LINT-YAML
+ lint-yaml-mode := $(if $(have-yaml-files),modified,all)
+ lint : lint-yaml-$(lint-yaml-mode)
+endif# NO-LINT-YAML
+## -----------------------------------------------------------------------
+## Intent: exhaustive yaml syntax checking
+## -----------------------------------------------------------------------
+lint-yaml-all:
+ $(HIDE)$(MAKE) --no-print-directory lint-yaml-install
+
+ find . \( -iname '*.yaml' -o -iname '*.yml' \) -print0 \
+ | $(xargs-n1-clean) yamllint --strict
+
+## -----------------------------------------------------------------------
+## Intent: check deps for format and python3 cleanliness
+## Note:
+## yaml --py3k option no longer supported
+## -----------------------------------------------------------------------
+lint-yaml-modified:
+ $(HIDE)$(MAKE) --no-print-directory lint-yaml-install
+ yamllint -s $(YAML_FILES)
+
+## -----------------------------------------------------------------------
+## Intent:
+## -----------------------------------------------------------------------
+lint-yaml-install:
+ @echo
+ @echo "** -----------------------------------------------------------------------"
+ @echo "** yaml syntax checking"
+ @echo "** -----------------------------------------------------------------------"
+ yamllint --version
+ @echo
+
+## -----------------------------------------------------------------------
+## Intent: Display command usage
+## -----------------------------------------------------------------------
help::
- @echo " lint-yaml Syntax check yaml source using yamllint"
+ @echo ' lint-yaml Syntax check python using the yaml command'
+ ifdef VERBOSE
+ @echo ' lint-yaml-all yaml checking: exhaustive'
+ @echo ' lint-yaml-modified yaml checking: only modified'
+ endif
+
+$(if $(DEBUG),$(warning LEAVE))
# [EOF]