aboutsummaryrefslogtreecommitdiffstats
path: root/tutorials/ApacheCNF/templates/Makefile
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@orange.com>2022-03-22 00:52:38 +0100
committerLukasz Rajewski <lukasz.rajewski@orange.com>2022-03-22 10:43:21 +0100
commita112ebd160d3acc20e6766d8550d757a0581797d (patch)
treead080e367a66f1e8777288943da79e87bbecbb14 /tutorials/ApacheCNF/templates/Makefile
parentf491b9fa0e1f5481065f9071aca469180635778e (diff)
[APACHE] Add Apache CNF use case files
Issue-ID: INT-2094 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Signed-off-by: Michal Chabiera <michal.chabiera@orange.com> Signed-off-by: Michal Grzesik <michal.grzesik@orange.com> Change-Id: Ie8f72b9804f1055f49e1bc85dd0d712841eb0f5d
Diffstat (limited to 'tutorials/ApacheCNF/templates/Makefile')
-rw-r--r--tutorials/ApacheCNF/templates/Makefile42
1 files changed, 42 insertions, 0 deletions
diff --git a/tutorials/ApacheCNF/templates/Makefile b/tutorials/ApacheCNF/templates/Makefile
new file mode 100644
index 00000000..9866d6c5
--- /dev/null
+++ b/tutorials/ApacheCNF/templates/Makefile
@@ -0,0 +1,42 @@
+.PHONY: all clean helm base clean_all package cba jsonlint_cba
+NATIVE_ONBOARDING_PACKAGE_NAME ?= native_cnf_k8s_demo
+CBA_NAME ?= CBA
+_type_files = $(wildcard cba/Definitions/*_types.json)
+
+
+clean_all:
+ $(MAKE) clean
+ $(MAKE) all
+
+#Can't use .csar extension or SDC will panic
+all: package helm base cba
+ cd package_native/ && zip -r $(NATIVE_ONBOARDING_PACKAGE_NAME).zip .
+ mv package_native/$(NATIVE_ONBOARDING_PACKAGE_NAME).zip .
+ cp $(NATIVE_ONBOARDING_PACKAGE_NAME).zip ../automation/vsp/
+
+helm: package
+ $(MAKE) -C helm
+ mv helm/helm_*.tgz package_native/
+
+base: package
+ cp base_native/* package_native/
+
+cba: package
+ cd cba/ && zip -r $(CBA_NAME).zip . -x pom.xml .idea/\* target/\*
+ mv cba/$(CBA_NAME).zip package_native/
+
+package:
+ mkdir package_native/
+
+clean:
+ rm -rf package_native/
+ rm -f $(NATIVE_ONBOARDING_PACKAGE_NAME).zip
+
+jsonlint_cba: $(_type_files)
+ @:
+
+#This shouldn't be PHONY, but it's easier now to define this way
+.PHONY: $(_type_files)
+$(_type_files):
+ @which jq expand unexpand sponge >/dev/null
+ jq -S . <$@ | unexpand -t 2 | expand -t 4 | sponge $@