Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
70 lines (53 loc) · 1.81 KB
/
Copy pathMakefile
File metadata and controls
70 lines (53 loc) · 1.81 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# cinc-console developer tasks.
# Run `make help` for a list.
IMAGE ?= ghcr.io/cinc-project/cinc-console
TAG ?= dev
CHART := deploy/helm/cinc-console
.DEFAULT_GOAL := help
.PHONY: help
help: ## Show this help
@grep -hE '^[a-zA-Z0-9_-]+:.*?## ' $(MAKEFILE_LIST) \
| awk 'BEGIN{FS=":.*?## "}{printf " \033[1m%-14s\033[0m %s\n", $$1, $$2}'
.PHONY: install
install: ## Install dependencies
pnpm install
.PHONY: dev
dev: ## Run the dev server (http://localhost:3000)
pnpm dev
.PHONY: test
test: ## Run unit tests
pnpm test
.PHONY: e2e
e2e: ## Run Playwright e2e tests against a throwaway cinc-server-ng
bash scripts/e2e.sh
.PHONY: lint
lint: ## Run eslint
pnpm lint
.PHONY: build
build: ## Production build
pnpm build
.PHONY: check
check: test lint build ## Run tests, lint, and build (CI parity)
.PHONY: docker-build
docker-build: ## Build the container image ($(IMAGE):$(TAG))
docker build -t $(IMAGE):$(TAG) .
.PHONY: smoke
smoke: ## Build the image and verify /api/healthz
bash scripts/smoke.sh
.PHONY: helm-lint
helm-lint: ## Lint the Helm chart
helm lint $(CHART) --set cincServerUrl=https://chef.example.com --set webuiKey=DUMMY
.PHONY: helm-template
helm-template: ## Render the Helm chart
helm template c $(CHART) --set cincServerUrl=https://chef.example.com --set webuiKey=DUMMY
.PHONY: release-pr
release-pr: ## Open a release PR (VERSION=0.5.0); merging it cuts the release
@test -n "$(VERSION)" || { echo "usage: make release-pr VERSION=0.5.0"; exit 2; }
gh workflow run release-pr.yml -f version=$(VERSION)
.PHONY: version-check
version-check: ## Verify version references agree (VERSION=0.5.0)
@test -n "$(VERSION)" || { echo "usage: make version-check VERSION=0.5.0"; exit 2; }
node scripts/set-version.mjs --check $(VERSION)
.PHONY: clean
clean: ## Remove build artifacts
rm -rf .next node_modules/.cache