feat: Add pre-commit hooks for automated code quality checks (#3001)
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
This commit is contained in:
parent
e277a6e29d
commit
88c67229aa
|
|
@ -0,0 +1,22 @@
|
|||
repos:
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 24.2.0
|
||||
hooks:
|
||||
- id: black
|
||||
files: ^(common|example)/.*\.py$
|
||||
exclude: .*upstream.*
|
||||
|
||||
- repo: https://github.com/adrienverge/yamllint
|
||||
rev: v1.35.1
|
||||
hooks:
|
||||
- id: yamllint
|
||||
files: ^(common|example|hack|tests|\.github)/.*\.ya?ml$
|
||||
exclude: .*upstream.*
|
||||
args: [--config-file=.yamllint.yaml]
|
||||
|
||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||
rev: v0.9.0.6
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
files: ^.*\.sh$
|
||||
exclude: (^apps/.*|.*upstream.*)
|
||||
|
|
@ -4,8 +4,6 @@ set -euxo
|
|||
|
||||
NAMESPACE=$1
|
||||
TIMEOUT=120 # timeout in seconds
|
||||
SLEEP_INTERVAL=30 # interval between checks in seconds
|
||||
SPARK_VERSION=3.5.2
|
||||
|
||||
start_time=$(date +%s)
|
||||
for ((i=0; i<TIMEOUT; i+=2)); do
|
||||
|
|
|
|||
|
|
@ -5,9 +5,8 @@ echo "Installing KNative with Istio-CNI ..."
|
|||
|
||||
# Retry mechanism for applying Knative manifests
|
||||
set +e
|
||||
for i in {1..5}; do
|
||||
kustomize build common/knative/knative-serving/base | kubectl apply -f -
|
||||
if [[ $? -eq 0 ]]; then
|
||||
for _ in {1..5}; do
|
||||
if kustomize build common/knative/knative-serving/base | kubectl apply -f -; then
|
||||
break
|
||||
fi
|
||||
echo "Retrying in 30 seconds..."
|
||||
|
|
|
|||
|
|
@ -5,9 +5,8 @@ echo "Installing KNative ..."
|
|||
|
||||
# Retry mechanism for applying Knative manifests
|
||||
set +e
|
||||
for i in {1..5}; do
|
||||
kustomize build common/knative/knative-serving/base | kubectl apply -f -
|
||||
if [[ $? -eq 0 ]]; then
|
||||
for _ in {1..5}; do
|
||||
if kustomize build common/knative/knative-serving/base | kubectl apply -f -; then
|
||||
break
|
||||
fi
|
||||
echo "Retrying in 30 seconds..."
|
||||
|
|
|
|||
Loading…
Reference in New Issue