-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
24 lines (20 loc) · 818 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# Variables
prefix="Pink"
resourceGroupName="${prefix}RG"
deploymentName="deploymentScript"
# Get the URL of the productpage of the bookinfo sample application
bookInfoUrlExternal=$(az deployment group show \
--name $deploymentName \
--resource-group $resourceGroupName \
--query properties.outputs.bookInfoUrlExternal.value \
--output tsv)
if [[ -n $bookInfoUrlExternal ]]; then
echo "[$bookInfoUrlExternal] URL of the productpage of the bookinfo sample application successfully retrieved"
else
echo "Failed to get the URL of the productpage of the bookinfo sample application"
exit -1
fi
# Call the URL of the productpage of the bookinfo sample application
echo "Calling the URL of the productpage of the bookinfo sample application"
curl -s $bookInfoUrlExternal | grep -o "<title>.*</title>"