Skip to content

Commit

Permalink
renamed azure csx test function to reflect .net version (3.1). Also f…
Browse files Browse the repository at this point in the history
…ixed defauts for runtimeversion which caused badly named csx resource-group deployments
  • Loading branch information
Learnspree committed Mar 30, 2020
1 parent f28289d commit 71b7c5c
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions azure-test/spf-build-azure-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
helpFunction()
{
echo ""
echo "Usage: $0 -r region -p deploy_password -l runtime -e environment [-v runtime-version]"
echo "Usage: $0 -r region -p deploy_password -l runtime -e environment -v runtime-version"
exit 1 # Exit script after printing help
}

Expand All @@ -22,7 +22,7 @@ do
done

# Print helpFunction in case parameters are empty
if [ -z "$region" ] || [ -z "$servicePrincipalPassword" ] || [ -z "$languageRuntime" ] || [ -z "$environment" ]
if [ -z "$region" ] || [ -z "$servicePrincipalPassword" ] || [ -z "$languageRuntime" ] || [ -z "$environment" ] || [ -z "$runtimeVersion" ]
then
echo "Some or all of the required parameters are empty";
helpFunction
Expand All @@ -33,12 +33,12 @@ deploy_azure_function_app () {

echo ""
echo "****************************************************"
echo "***** SPF: running deploy - runtime: $1, region: $2, sourcepath: $3, environment: $4, state: $5, runtimeVersion: $6 ... *****"
echo "***** SPF: running deploy - runtime: $1, region: $2, sourcepath: $3, environment: $4, runtimeVersion: $5, state: $6 ... *****"
echo ""
echo "***** SPF: deploy function app *****"
pwsh -f deploy-test-function-app.ps1 -runtime "$1" -region "$2" -environment "$4" -teststate ${5:-"all"} -runtimeVersion ${6:-"10"}
pwsh -f deploy-test-function-app.ps1 -runtime "$1" -region "$2" -environment "$4" -runtimeVersion "$5" -teststate ${6:-"all"}
echo "***** SPF: deploy functions to function app *****"
pwsh -f deploy-test-functions-to-function-app.ps1 -runtime "$1" -region "$2" -sourcepath "$3" -environment "$4" -teststate ${5:-"all"} -runtimeVersion ${6:-"10"}
pwsh -f deploy-test-functions-to-function-app.ps1 -runtime "$1" -region "$2" -sourcepath "$3" -environment "$4" -runtimeVersion "$5" -teststate ${6:-"all"}
}

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
Expand All @@ -57,10 +57,10 @@ pwsh -f login-with-service-principal.ps1 -servicePrincipalPass $servicePrincipal
if [ "$languageRuntime" == "node" ]
then
# node is deployed in two separate function apps for cold/warm due to how it detects whether it's a cold or warm start state
deploy_azure_function_app "$languageRuntime" "$region" "../azure-service-warmstart-$languageRuntime" "$environment" "warm" "$runtimeVersion"
deploy_azure_function_app "$languageRuntime" "$region" "../azure-service-coldstart-$languageRuntime" "$environment" "cold" "$runtimeVersion"
deploy_azure_function_app "$languageRuntime" "$region" "../azure-service-warmstart-$languageRuntime" "$environment" "$runtimeVersion" "warm"
deploy_azure_function_app "$languageRuntime" "$region" "../azure-service-coldstart-$languageRuntime" "$environment" "$runtimeVersion" "cold"
else
deploy_azure_function_app "$languageRuntime" "$region" "../azure-service-$languageRuntime" "$environment"
deploy_azure_function_app "$languageRuntime" "$region" "../azure-service-$languageRuntime" "$environment" "$runtimeVersion"
fi

echo "***** SPF: finished deploy stage for Azure Test Functions *****"
12 changes: 6 additions & 6 deletions azure-test/spf-remove-azure-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
helpFunction()
{
echo ""
echo "Usage: $0 -r region -p deploy_password -l runtime -e environment [-v runtime-version]"
echo "Usage: $0 -r region -p deploy_password -l runtime -e environment -v runtime-version"
exit 1 # Exit script after printing help
}

Expand All @@ -20,7 +20,7 @@ do
done

# Print helpFunction in case parameters are empty
if [ -z "$region" ] || [ -z "$servicePrincipalPassword" ] || [ -z "$languageRuntime" ] || [ -z "$environment" ]
if [ -z "$region" ] || [ -z "$servicePrincipalPassword" ] || [ -z "$languageRuntime" ] || [ -z "$environment" ] || [ -z "$runtimeVersion" ]
then
echo "Some or all of the parameters are empty";
helpFunction
Expand All @@ -30,9 +30,9 @@ remove_azure_function_app () {

echo ""
echo "****************************************************"
echo "***** SPF: running remove - runtime: $1, region: $2, environment: $3, state $4, runtimeVersion: $5 .... *****"
echo "***** SPF: running remove - runtime: $1, region: $2, environment: $3, runtimeVersion: $4, state $5 .... *****"
echo ""
pwsh -f remove-test-function-app.ps1 -runtime "$1" -region "$2" -environment ${3:-"dev"} -teststate ${4:-"all"} -runtimeVersion ${5:-"10"}
pwsh -f remove-test-function-app.ps1 -runtime "$1" -region "$2" -environment "$3" -runtimeVersion "$4" -teststate ${5:-"all"}
}

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
Expand All @@ -51,8 +51,8 @@ pwsh -f login-with-service-principal.ps1 -servicePrincipalPass $servicePrincipal
if [ "$languageRuntime" == "node" ]
then
# node is deployed in two separate function apps for cold/warm due to how it detects whether it's a cold or warm start state
remove_azure_function_app "$languageRuntime" "$region" "$environment" "warm" "$runtimeVersion"
remove_azure_function_app "$languageRuntime" "$region" "$environment" "cold" "$runtimeVersion"
remove_azure_function_app "$languageRuntime" "$region" "$environment" "$runtimeVersion" "warm"
remove_azure_function_app "$languageRuntime" "$region" "$environment" "$runtimeVersion" "cold"
else
remove_azure_function_app "$languageRuntime" "$region" "$environment" "$runtimeVersion"
fi
Expand Down

0 comments on commit 71b7c5c

Please sign in to comment.