makefiles/include.mk
makefiles/git-submodules.mk
makefiles/lint/jjb.mk
makefiles/virtualenv.mk
---------------------------
o Update lint-venv to depend on venv activate and git submodules.
o Added a named target for git submodule checkout.
jjb/voltha-scale.yaml
---------------------
o Cleanup lint errors -- duplicate v2.11 job declarations.
Change-Id: I3f63a9b6be8d0c754ea3a56488d6d9ad7dc57291
diff --git a/makefiles/git-submodules.mk b/makefiles/git-submodules.mk
index 79809c3..24ad2b0 100644
--- a/makefiles/git-submodules.mk
+++ b/makefiles/git-submodules.mk
@@ -25,10 +25,10 @@
## -----------------------------------------------------------------------
## Intent: Checkout submodules required by ci-management
## -----------------------------------------------------------------------
-submodule-repo := $(null)
-submodule-repo += global-jjb
-submodule-repo += lf-ansible
-submodule-repo += packer
+submodule-repos := $(null)
+submodule-repos += global-jjb
+submodule-repos += lf-ansible
+submodule-repos += packer
submodule-deps := $(null)
submodule-deps += submodules# # named pseudo target
@@ -36,9 +36,14 @@
.PHONY: $(submodule-deps)
$(submodule-deps):
+ @echo
+ @echo "Checkout dependent submodules"
$(GIT) submodule init
$(GIT) submodule update
+# Abstraction: named target for submodule checkout
+checkout-ci-management-sub-modules: $(submodule-repos)
+
## -----------------------------------------------------------------------
## Intent: Revert sandbox to a pristine state.
## -----------------------------------------------------------------------
diff --git a/makefiles/include.mk b/makefiles/include.mk
index 73696d9..18ff197 100644
--- a/makefiles/include.mk
+++ b/makefiles/include.mk
@@ -30,8 +30,8 @@
include $(ONF_MAKE)/consts.mk
include $(ONF_MAKE)/help/include.mk
+include $(ONF_MAKE)/virtualenv.mk# # lint-{jjb,python} depends on venv
include $(ONF_MAKE)/lint/include.mk
-include $(ONF_MAKE)/virtualenv.mk
include $(ONF_MAKE)/git-submodules.mk
include $(ONF_MAKE)/todo.mk
include $(ONF_MAKE)/help/variables.mk
diff --git a/makefiles/lint/jjb.mk b/makefiles/lint/jjb.mk
index c85b8b9..ccfa073 100644
--- a/makefiles/lint/jjb.mk
+++ b/makefiles/lint/jjb.mk
@@ -18,6 +18,7 @@
##-------------------##
##---] GLOBALS [---##
##-------------------##
+.PHONY: lint-venv
##-------------------##
##---] TARGETS [---##
@@ -42,15 +43,18 @@
lint-jjb-args += --config-xml# # JJB v3.0 write to OUTPUT/jobname/config.xml
lint-jjb-args += jjb/# # JJB config sources (input)
-lint-jjb:
- jenkins-jobs $(lint-jjb-args)
+lint-jjb-deps := $(null)
+lint-jjb-deps += $(venv-activate-script)
+lint-jjb-deps += checkout-ci-management-sub-modules
+lint-jjb: $(lint-jjb-deps)
+ $(activate) && { jenkins-jobs $(lint-jjb-args); }
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
help ::
@echo ' lint-jjb Validate jjb job generation'
ifdef VERBOSE
- @echo '1 DEBUG=1 lint-jjb --log_level=DEBUG'
+ @echo ' DEBUG=1 lint-jjb --log_level=DEBUG'
endif
# [EOF]
diff --git a/makefiles/virtualenv.mk b/makefiles/virtualenv.mk
index 9fb5ad9..43a4e67 100644
--- a/makefiles/virtualenv.mk
+++ b/makefiles/virtualenv.mk
@@ -17,6 +17,14 @@
$(if $(DEBUG),$(warning ENTER))
+##-------------------##
+##---] GLOBALS [---##
+##-------------------##
+.PHONY: venv
+
+##------------------##
+##---] LOCALS [---##
+##------------------##
venv-name ?= .venv
venv-abs-path := $(PWD)/$(venv-name)