A lightweight solution for configuration of baremetal nodes.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Copyright 2017 The Openstack-Helm Authors.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. BUILD_DIR := $(shell mkdir -p build && mktemp -d -p build)
  15. HELM := $(shell realpath $(BUILD_DIR))/helm
  16. TASK := build
  17. EXCLUDES := helm-toolkit docs tests tools logs
  18. CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.)))
  19. CHART := divingbell
  20. export
  21. all: $(CHART)
  22. $(CHART):
  23. @echo
  24. @echo "===== Processing [$@] chart ====="
  25. @make $(TASK)-$@
  26. init-%: clean helm-install
  27. DEP_UP_LIST=$* tools/helm_tk.sh $(HELM)
  28. lint-%: init-%
  29. if [ -d $* ]; then $(HELM) lint $*; fi
  30. dryrun-%: init-%
  31. $(HELM) template $*
  32. build-%: lint-%
  33. if [ -d $* ]; then $(HELM) package $*; fi
  34. clean:
  35. @echo "Removed .b64, _partials.tpl, and _globals.tpl files"
  36. rm -rf helm-toolkit/secrets/*.b64
  37. rm -rf */templates/_partials.tpl
  38. rm -rf */templates/_globals.tpl
  39. rm -rf doc/build
  40. .PHONY: $(EXCLUDES) $(CHARTS)
  41. .PHONY: charts
  42. charts: clean build-$(CHART)
  43. # TODO This needs to run the equivalent of what is in
  44. # divingbell/tools/gate/setup.sh + test.sh . At present, this is
  45. # being investigated on how to bring it up to date.
  46. .PHONY: tests
  47. tests: charts
  48. .PHONY: docs
  49. docs: clean build_docs
  50. .PHONY: build_docs
  51. build_docs:
  52. tox -e docs
  53. .PHONY: helm-install
  54. helm-install:
  55. tools/helm_install.sh $(HELM)