adding git hooks to catch pipeline issues before pushing
Some checks failed
CI / Rustfmt (push) Successful in 51s
CI / Clippy (push) Successful in 2m8s
CI / Web Blocking Checks (push) Successful in 47s
CI / Security Blocking Checks (push) Successful in 9s
CI / Cargo Audit & Deny (push) Successful in 2m3s
CI / Web Advisory Checks (push) Successful in 25s
Publish Images And Chart / Resolve Publish Metadata (push) Successful in 1s
Publish Images And Chart / Publish init-packs (push) Failing after 11s
Publish Images And Chart / Publish init-user (push) Failing after 11s
Publish Images And Chart / Publish migrations (push) Failing after 11s
Publish Images And Chart / Publish sensor (push) Failing after 6s
Publish Images And Chart / Publish web (push) Failing after 9s
Publish Images And Chart / Publish worker (push) Failing after 7s
Publish Images And Chart / Publish api (push) Failing after 7s
Publish Images And Chart / Publish executor (push) Failing after 10s
Publish Images And Chart / Publish notifier (push) Failing after 10s
Publish Images And Chart / Publish Helm Chart (push) Has been skipped
CI / Security Advisory Checks (push) Successful in 6m20s
CI / Tests (push) Successful in 1h35m45s
Some checks failed
CI / Rustfmt (push) Successful in 51s
CI / Clippy (push) Successful in 2m8s
CI / Web Blocking Checks (push) Successful in 47s
CI / Security Blocking Checks (push) Successful in 9s
CI / Cargo Audit & Deny (push) Successful in 2m3s
CI / Web Advisory Checks (push) Successful in 25s
Publish Images And Chart / Resolve Publish Metadata (push) Successful in 1s
Publish Images And Chart / Publish init-packs (push) Failing after 11s
Publish Images And Chart / Publish init-user (push) Failing after 11s
Publish Images And Chart / Publish migrations (push) Failing after 11s
Publish Images And Chart / Publish sensor (push) Failing after 6s
Publish Images And Chart / Publish web (push) Failing after 9s
Publish Images And Chart / Publish worker (push) Failing after 7s
Publish Images And Chart / Publish api (push) Failing after 7s
Publish Images And Chart / Publish executor (push) Failing after 10s
Publish Images And Chart / Publish notifier (push) Failing after 10s
Publish Images And Chart / Publish Helm Chart (push) Has been skipped
CI / Security Advisory Checks (push) Successful in 6m20s
CI / Tests (push) Successful in 1h35m45s
This commit is contained in:
21
Makefile
21
Makefile
@@ -3,7 +3,8 @@
|
||||
docker-up docker-down docker-cache-warm docker-stop-system-services dev watch generate-agents-index \
|
||||
docker-build-workers docker-build-worker-base docker-build-worker-python \
|
||||
docker-build-worker-node docker-build-worker-full deny ci-rust ci-web-blocking ci-web-advisory \
|
||||
ci-security-blocking ci-security-advisory ci-blocking ci-advisory
|
||||
ci-security-blocking ci-security-advisory ci-blocking ci-advisory \
|
||||
fmt-check pre-commit install-git-hooks
|
||||
|
||||
# Default target
|
||||
help:
|
||||
@@ -25,8 +26,12 @@ help:
|
||||
@echo ""
|
||||
@echo "Code Quality:"
|
||||
@echo " make fmt - Format all code"
|
||||
@echo " make fmt-check - Verify formatting without changing files"
|
||||
@echo " make clippy - Run linter"
|
||||
@echo " make lint - Run both fmt and clippy"
|
||||
@echo " make deny - Run cargo-deny checks"
|
||||
@echo " make pre-commit - Run the git pre-commit checks locally"
|
||||
@echo " make install-git-hooks - Configure git to use the repo hook scripts"
|
||||
@echo ""
|
||||
@echo "Running Services:"
|
||||
@echo " make run-api - Run API service"
|
||||
@@ -111,6 +116,9 @@ check:
|
||||
fmt:
|
||||
cargo fmt --all
|
||||
|
||||
fmt-check:
|
||||
cargo fmt --all -- --check
|
||||
|
||||
clippy:
|
||||
cargo clippy --all-features -- -D warnings
|
||||
|
||||
@@ -381,9 +389,14 @@ licenses:
|
||||
cargo license --json > licenses.json
|
||||
@echo "License information saved to licenses.json"
|
||||
|
||||
# All-in-one check before committing
|
||||
pre-commit: fmt clippy test
|
||||
@echo "✅ All checks passed! Ready to commit."
|
||||
# All blocking checks run by the git pre-commit hook after formatting
|
||||
pre-commit: deny ci-web-blocking ci-security-blocking
|
||||
@echo "✅ Pre-commit checks passed."
|
||||
|
||||
install-git-hooks:
|
||||
git config core.hooksPath .githooks
|
||||
chmod +x .githooks/pre-commit
|
||||
@echo "✅ Git hooks configured to use .githooks/"
|
||||
|
||||
# CI simulation
|
||||
ci: ci-blocking ci-advisory
|
||||
|
||||
Reference in New Issue
Block a user