Skip to content

Commit

Permalink
refactor and allow passing installable runtime filter
Browse files Browse the repository at this point in the history
  • Loading branch information
brettlangdon committed Nov 22, 2024
1 parent 6d6e8e5 commit 32e1439
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions utils/build/ssi/build_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ while [[ "$#" -gt 0 ]]; do
case $1 in
dotnet|java|nodejs|php|python|ruby) TEST_LIBRARY="$1";;
-l|--library) TEST_LIBRARY="$2"; shift ;;
-r|--installable-runtime) INSTALLABLE_RUNTIME="$2"; shift ;;
-w|--weblog-variant) WEBLOG_VARIANT="$2"; shift ;;
-a|--arch) ARCH="$2"; shift ;;
-f|--force-build) FORCE_BUILD="$2"; shift ;;
Expand Down Expand Up @@ -64,11 +65,17 @@ do
base_image=$(echo "$row" | jq -r .base_image)
arch=$(echo "$row" | jq -r .arch)
installable_runtime=$(echo "$row" | jq -r .installable_runtime)
if [ -z "$WEBLOG_VARIANT" ] || [ "$WEBLOG_VARIANT" = "$weblog" ]; then
if [ -z "$ARCH" ] || [ "$ARCH" = "$arch" ]; then
echo "Runing test scenario for weblog [${weblog}], base_image [${base_image}], arch [${arch}], installable_runtime [${installable_runtime}], extra_args: [${extra_args}]"
./run.sh DOCKER_SSI --ssi-weblog "$weblog" --ssi-library "$TEST_LIBRARY" --ssi-base-image "$base_image" --ssi-arch "$arch" --ssi-installable-runtime "$installable_runtime" "$extra_args"
fi
fi
if [ -n "$INSTALLABLE_RUNTIME" ] && [ "$INSTALLABLE_RUNTIME" != "$installable_runtime" ]; then
continue
fi
if [ -n "$WEBLOG_VARIANT" ] && [ "$WEBLOG_VARIANT" != "$weblog" ]; then
continue
fi
if [ -n "$ARCH" ] && [ "$ARCH" != "$arch" ]; then
continue
fi

echo "Runing test scenario for weblog [${weblog}], base_image [${base_image}], arch [${arch}], installable_runtime [${installable_runtime}], extra_args: [${extra_args}]"
./run.sh DOCKER_SSI --ssi-weblog "$weblog" --ssi-library "$TEST_LIBRARY" --ssi-base-image "$base_image" --ssi-arch "$arch" --ssi-installable-runtime "$installable_runtime" "$extra_args"

done < <(echo "$matrix_json" | jq -c ".${TEST_LIBRARY}.parallel.matrix[]")

0 comments on commit 32e1439

Please sign in to comment.