Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,19 @@ pre_commit() {
run_job_in_background "python_formatting"
run_job_in_background "check_erroneous_kubebuilder_annotations"
run_job_in_background "validate_snippets"
run_job_in_background "lint_helm_chart"

if wait_for_all_background_jobs; then
echo -e "${GREEN}pre-commit: All checks passed!${NO_COLOR}"
return 0
# lint_helm_chart must be run after all the background jobs are finished because one of the BG jobs (update_jobs)
# updates the helm chart. And lint_helm_chart requires the helm chart to be updated already.
lint_helm_chart

local lint_helm_chart_status=$?
if [ "$lint_helm_chart_status" -eq 0 ]; then
return 0
echo -e "${GREEN}pre-commit: All checks passed!${NO_COLOR}"
else
return 1
fi
else
return 1
fi
Expand Down