Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Actors/ActorCounter/Scripts/upgrade.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ set -x
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
appPkg="$DIR/../CounterActorApplication"

if [[ "$#" != "0" ]];then
version="$1"
else
version="1.0.0"
fi

sfctl application upload --path $appPkg --show-progress
if [ $? -ne 0 ]; then
echo "Application copy failed."
Expand All @@ -16,9 +22,8 @@ if [ $? -ne 0 ]; then
exit 1
fi

version=$(sed -e "s/xmlns/ignore/" $appPkg/ApplicationManifest.xml | xmllint --xpath "string(//ApplicationManifest/@ApplicationTypeVersion)" -)
eval sfctl application upgrade --app-id CounterActorApplication --app-version ${version} --parameters "" --mode "Monitored"
eval sfctl application upgrade --app-id fabric:/CounterActorApplication --app-version ${version} --parameters [] --mode "Monitored"
if [ $? -ne 0 ]; then
echo "Upgrade of application failed."
exit 1
fi
fi
11 changes: 8 additions & 3 deletions Actors/VisualObjectActor/Scripts/upgrade.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ set -x
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
appPkg="$DIR/../VisualObjectApplication"

if [[ "$#" != "0" ]];then
version="$1"
else
version="1.0.0"
fi

sfctl application upload --path $appPkg --show-progress
if [ $? -ne 0 ]; then
echo "Application copy failed."
Expand All @@ -18,11 +24,10 @@ fi

# Check parameters to see if InstanceCount was previously specified
params=$(sfctl application info --application-id VisualObjectApplication --query "parameters[].[key, value][]")
version=$(sed -e "s/xmlns/ignore/" $appPkg/ApplicationManifest.xml | xmllint --xpath "string(//ApplicationManifest/@ApplicationTypeVersion)" -)
if [[ $params =~ "InstanceCount" ]]; then
sfctl application upgrade --app-id VisualObjectApplication --app-version ${version} --parameters "{\"InstanceCount\":\"-1\"}" --mode "Monitored"
sfctl application upgrade --app-id fabric:/VisualObjectApplication --app-version ${version} --parameters "{\"InstanceCount\":\"-1\"}" --mode "Monitored"
else
sfctl application upgrade --app-id VisualObjectApplication --app-version ${version} --parameters "" --mode "Monitored"
sfctl application upgrade --app-id fabric:/VisualObjectApplication --app-version ${version} --parameters [] --mode "Monitored"
fi
if [ $? -ne 0 ]; then
echo "Upgrade of application failed."
Expand Down
12 changes: 9 additions & 3 deletions Services/EchoServer/EchoServer1.0/Scripts/upgrade.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ set -x
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
appPkg="$DIR/../EchoServerApplication"

if [[ "$#" != "0" ]];then
version="$1"
else
version="1.0.0"
fi

sfctl application upload --path $appPkg --show-progress
if [ $? -ne 0 ]; then
echo "Application copy failed."
Expand All @@ -18,12 +24,12 @@ fi

# Check parameters to see if InstanceCount was previously specified
params=$(sfctl application info --application-id EchoServerApplication --query "parameters[].[key, value][]")
version=$(sed -e "s/xmlns/ignore/" $appPkg/ApplicationManifest.xml | xmllint --xpath "string(//ApplicationManifest/@ApplicationTypeVersion)" -)
if [[ $params =~ "InstanceCount" ]]; then
sfctl application upgrade --app-id EchoServerApplication --app-version ${version} --parameters "{\"InstanceCount\":\"-1\"}" --mode "Monitored"
sfctl application upgrade --app-id fabric:/EchoServerApplication --app-version ${version} --parameters "{\"InstanceCount\":\"-1\"}" --mode Monitored
else
sfctl application upgrade --app-id EchoServerApplication --app-version ${version} --parameters "" --mode "Monitored"
sfctl application upgrade --app-id fabric:/EchoServerApplication --app-version ${version} --parameters [] --mode "Monitored"
fi

if [ $? -ne 0 ]; then
echo "Upgrade of application failed."
exit 1
Expand Down
12 changes: 9 additions & 3 deletions Services/EchoServer/EchoServer2.0/Scripts/upgrade.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ set -x
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
appPkg="$DIR/../EchoServerApplication2"

if [[ "$#" != "0" ]];then
version="$1"
else
version="1.0.0"
fi

sfctl application upload --path $appPkg --show-progress
if [ $? -ne 0 ]; then
echo "Application copy failed."
Expand All @@ -18,12 +24,12 @@ fi

# Check parameters to see if InstanceCount was previously specified
params=$(sfctl application info --application-id EchoServerApplication --query "parameters[].[key, value][]")
version=$(sed -e "s/xmlns/ignore/" $appPkg/ApplicationManifest.xml | xmllint --xpath "string(//ApplicationManifest/@ApplicationTypeVersion)" -)
if [[ $params =~ "InstanceCount" ]]; then
sfctl application upgrade --app-id EchoServerApplication --app-version ${version} --parameters "{\"InstanceCount\":\"-1\"}" --mode "Monitored"
sfctl application upgrade --app-id fabric:/EchoServerApplication --app-version ${version} --parameters "{\"InstanceCount\":\"-1\"}" --mode "Monitored"
else
sfctl application upgrade --app-id EchoServerApplication --app-version ${version} --parameters "" --mode "Monitored"
sfctl application upgrade --app-id fabric:/EchoServerApplication --app-version ${version} --parameters [] --mode "Monitored"
fi

if [ $? -ne 0 ]; then
echo "Upgrade of application failed."
exit 1
Expand Down
12 changes: 9 additions & 3 deletions Services/Gateway/Scripts/upgrade.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ set -x
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
appPkg="$DIR/../GatewayApplication"

if [[ "$#" != "0" ]];then
version="$1"
else
version="1.0.0"
fi

sfctl application upload --path $appPkg --show-progress
if [ $? -ne 0 ]; then
echo "Application copy failed."
Expand All @@ -18,12 +24,12 @@ fi

# Check parameters to see if InstanceCount was previously specified
params=$(sfctl application info --application-id GatewayApplication --query "parameters[].[key, value][]")
version=$(sed -e "s/xmlns/ignore/" $appPkg/ApplicationManifest.xml | xmllint --xpath "string(//ApplicationManifest/@ApplicationTypeVersion)" -)
if [[ $params =~ "InstanceCount" ]]; then
sfctl application upgrade --app-id GatewayApplication --app-version ${version} --parameters "{\"InstanceCount\":\"-1\"}" --mode "Monitored"
sfctl application upgrade --app-id fabric:/GatewayApplication --app-version ${version} --parameters "{\"InstanceCount\":\"-1\"}" --mode "Monitored"
else
sfctl application upgrade --app-id GatewayApplication --app-version ${version} --parameters "" --mode "Monitored"
sfctl application upgrade --app-id fabric:/GatewayApplication --app-version ${version} --parameters [] --mode "Monitored"
fi

if [ $? -ne 0 ]; then
echo "Upgrade of application failed."
exit 1
Expand Down
9 changes: 7 additions & 2 deletions Services/JenkinsDocker/Scripts/upgrade.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ set -x
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
appPkg="$DIR/../JenkinsSF"

if [[ "$#" != "0" ]];then
version="$1"
else
version="1.0.0"
fi

sfctl application upload --path $appPkg --show-progress
if [ $? -ne 0 ]; then
echo "Application copy failed."
Expand All @@ -16,8 +22,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

version=$(sed -e "s/xmlns/ignore/" $appPkg/ApplicationManifest.xml | xmllint --xpath "string(//ApplicationManifest/@ApplicationTypeVersion)" -)
eval sfctl application upgrade --app-id JenkinsSF --app-version ${version} --parameters "" --mode "Monitored"
eval sfctl application upgrade --app-id fabric:/JenkinsSF --app-version ${version} --parameters [] --mode "Monitored"
if [ $? -ne 0 ]; then
echo "Upgrade of application failed."
exit 1
Expand Down
11 changes: 8 additions & 3 deletions Services/WatchDog/Scripts/upgrade.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ set -x
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
appPkg="$DIR/../WatchdogApplication"

if [[ "$#" != "0" ]];then
version="$1"
else
version="1.0.0"
fi

sfctl application upload --path $appPkg --show-progress
if [ $? -ne 0 ]; then
echo "Application copy failed."
Expand All @@ -18,11 +24,10 @@ fi

# Check parameters to see if InstanceCount was previously specified
params=$(sfctl application info --application-id WatchdogApplication --query "parameters[].[key, value][]")
version=$(sed -e "s/xmlns/ignore/" $appPkg/ApplicationManifest.xml | xmllint --xpath "string(//ApplicationManifest/@ApplicationTypeVersion)" -)
if [[ $params =~ "InstanceCount" ]]; then
sfctl application upgrade --app-id WatchdogApplication --app-version ${version} --parameters "{\"InstanceCount\":\"-1\"}" --mode "Monitored"
sfctl application upgrade --app-id fabric:/WatchdogApplication --app-version ${version} --parameters "{\"InstanceCount\":\"-1\"}" --mode "Monitored"
else
sfctl application upgrade --app-id WatchdogApplication --app-version ${version} --parameters "" --mode "Monitored"
sfctl application upgrade --app-id fabric:/WatchdogApplication --app-version ${version} --parameters [] --mode "Monitored"
fi
if [ $? -ne 0 ]; then
echo "Upgrade of application failed."
Expand Down