-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathMakefile
39 lines (31 loc) · 1.38 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
IMAGE_NAME ?= telco-reference
CONTAINER_TOOL ?= podman
# Basic lint checking
lintCheck:
# The configuration is done piece-wise in order to skip the
# kube-compare reference tree. Those yamls are augmented with
# golang templating and are not expected to be legal yaml.
yamllint -c .yamllint.yaml telco-core/configuration/*yaml
yamllint -c .yamllint.yaml telco-core/configuration/reference-crs
yamllint -c .yamllint.yaml telco-core/configuration/template-values
yamllint -c .yamllint.yaml telco-core/install/
yamllint -c .yamllint.yaml telco-hub/
# markdownlint rules, following: https://github.com/openshift/enhancements/blob/master/Makefile
.PHONY: markdownlint-image
markdownlint-image: ## Build local container markdownlint-image
$(CONTAINER_TOOL) image build -f ./hack/Dockerfile.markdownlint --tag $(IMAGE_NAME)-markdownlint:latest ./hack
.PHONY: markdownlint-image-clean
markdownlint-image-clean: ## Remove locally cached markdownlint-image
$(CONTAINER_TOOL) image rm $(IMAGE_NAME)-markdownlint:latest
markdownlint: markdownlint-image ## run the markdown linter
$(CONTAINER_TOOL) run \
--rm=true \
--env RUN_LOCAL=true \
--env VALIDATE_MARKDOWN=true \
--env PULL_BASE_SHA=$(PULL_BASE_SHA) \
-v $$(pwd):/workdir:Z \
$(IMAGE_NAME)-markdownlint:latest
ci-validate: lintCheck check-reference
.PHONY: check-reference
check-reference:
$(MAKE) -C ./telco-core/configuration check