Skip to content

Commit

Permalink
markups done
Browse files Browse the repository at this point in the history
  • Loading branch information
ebeaty-cisco committed May 16, 2024
1 parent d002d4f commit 3c4920e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/version-increment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:
with:
fetch-depth: 0



- uses: helm/chart-testing-action@v2.3.1

- name: Run chart-testing (check-version-increment)
Expand Down
18 changes: 14 additions & 4 deletions scripts/commit-check
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,23 @@ FAILURES=0
echo "Setting up python venv..."
TMP_VENV=$(mktemp -d -t venv.XXXXXX)
python3 -m venv "$TMP_VENV"
$TMP_VENV/bin/pip install --upgrade pip
$TMP_VENV/bin/pip install PyYAML
"$TMP_VENV"/bin/pip install --upgrade pip
"$TMP_VENV"/bin/pip install PyYAML

echo
echo "Running version-increment dependency check"
if ! ./scripts/check-dependency-version-increment; then
echo "Version-increment dependency check failed, check output and fix issues." >&2
FAILURES=$((FAILURES+1))
else
echo "Version-increment dependency check passed."
fi

echo
echo "Running helm lint..."
args=("--set" "image.repository=repository" "--set" "image.tag=latest")
error=false
for chart in charts/*; do
for chart in charts/{xrd-vrouter,xrd-control-plane}; do
pushd "$chart"
if ! (helm dependency update && helm lint "${args[@]}"); then
error=true
Expand All @@ -48,14 +50,18 @@ for chart in charts/*; do
done
if [ $error = true ]; then
FAILURES=$((FAILURES+1))
echo "helm lint failed, check output and fix errors" >&2
echo "Helm lint failed, check output and fix errors" >&2
else
echo "Helm lint passed."
fi

echo
echo "Running shellcheck..."
if ! shellcheck scripts/{chart-releaser,commit-check}; then
echo "Shellcheck failed, check output and fix issues." >&2
FAILURES=$((FAILURES+1))
else
echo "Shellcheck passed."
fi

podman build tests/ -t helm-tests --network host
Expand All @@ -65,13 +71,17 @@ echo "Running Control Plane unit tests..."
if ! podman run -v "$PWD/:/charts" helm-tests bats tests/ut/xrd-control-plane; then
echo "Control Plane unit tests failed, check output and fix issues." >&2
FAILURES=$((FAILURES+1))
else
echo "Control Plane unit tests passed."
fi

echo
echo "Running vRouter unit tests..."
if ! podman run -v "$PWD/:/charts" helm-tests bats tests/ut/xrd-vrouter; then
echo "vRouter unit tests failed, check output and fix issues." >&2
FAILURES=$((FAILURES+1))
else
echo "vRouter unit tests passed."
fi

#=====================================================
Expand Down

0 comments on commit 3c4920e

Please sign in to comment.