VOL-4836: Interactive helm chart linting.
repo:voltha-docs job reported reactive post-commit linting errors.
Begin adding support for make target lint-helm for early detection.
Makefile
--------
o Adding comments for readability.
o Disable failing/unused targets.
o Update help text.
o Migrating some targets and deps from Makefile proper into makefiles/*.
makefiles/README.md
-------------------
o Added a basic makefile readme with pointers to other web resources.
makefiles/lint/include.mk
makefiles/lint/helm/include.mk
-------------------------
o Initial support for library makefile target: 'lint-helm'
o Added common targets: clean, help, sterile and todo.
o Target 'pre-commit added:
- default target to support interactive use of lint-helm.
- Cleanup needed before common target can use lint-helm as a default.
o Interim answer: briding the gap between existing and portable logic.
o legacy logic (USE_LEGACY=1 (default)):
- Relies on .gitreview and hardcoding defaults (opencord/master).
- git has builtin support for local/remote branch queries.
- updates to support queries which simplify logic.
o Interactive target lint-helm-deps
- Configure helm charts per linting logic in gerrit/jenkins job.
- Interactive target will invoke make target with USE_LEGACY=$(null).
Change-Id: I43616d16707a09da6f907f909c65504da9933a6f
diff --git a/Makefile b/Makefile
index 1a86238..a5ca425 100644
--- a/Makefile
+++ b/Makefile
@@ -31,13 +31,13 @@
branch=`cat .gitreview | grep branch | cut -d '=' -f2`
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
help:: # @HELP Print the command options
- @echo
- @echo "[TEST]"
@echo " test Sanity check chart versions"
@echo
@echo "[CHECK: release]"
- @echo " helm-repo-tools Repository clone target"
+ @echo " helm-repo-tools Helper tools"
@echo " tagcollisionreject.sh 404 - raw.github source MIA"
@echo
@echo "\033[0;31m VOLTHA HELM CHARTS \033[0m"
@@ -69,12 +69,21 @@
test-tags: tagcollisionreject.sh
@bash ./tagcollisionreject.sh
+## -----------------------------------------------------------------------
+## [NOTE] moving to makefiles/lint/helm/include.mk
+## -----------------------------------------------------------------------
helm-repo-tools:
git clone "https://gerrit.opencord.org/helm-repo-tools"
-test: test-tags helm-repo-tools # @HELP Makes sure the versions used in the charts are valid
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
+# test-all += test-tags # tagcollisionreject + curl is broken
+test-all += helm-repo-tools
+test: $(test-all) # @HELP Makes sure the versions used in the charts are valid
@COMPARISON_BRANCH=origin/$(branch) ./helm-repo-tools/chart_version_check.sh
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
clean :: # @HELP Removes all files downloaded to run the tests
$(RM) -r helm-repo-tools
$(RM) tagcollisionreject.*