This repository was archived by the owner on Nov 15, 2018. It is now read-only.
File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,32 @@ if $script_dir/can_rollback; then
29
29
echo " Linking $deployment_repo_dir to ~/app-root/runtime/repo"
30
30
ln -s $deployment_repo_dir ~ /app-root/runtime/repo
31
31
32
+ java_artifacts=` find $deployment_repo_dir -iname \* .war -o -iname \* .ear -o -iname \* .sar | wc -l`
33
+ if [ $java_artifacts -ne 0 ] && [ -e $deployment_repo_dir /deployments ] && [ ! -e $deployment_repo_dir /deployments/ROOT.war ]; then
34
+ cp ~ /app-root/runtime/scripts/ROOT.war $deployment_repo_dir /deployments/ROOT.war
35
+ fi
36
+
37
+ set_app_state deploying
38
+
39
+ framework_carts=($( get_installed_framework_carts) )
40
+ primary_framework_cart=${framework_carts[0]}
41
+
42
+ echo " Calling deploy"
43
+ if [ -e ${CARTRIDGE_BASE_PATH} /${primary_framework_cart} /info/bin/deploy.sh ]; then
44
+ ${CARTRIDGE_BASE_PATH} /${primary_framework_cart} /info/bin/deploy.sh
45
+ else
46
+ ${CARTRIDGE_BASE_PATH} /abstract/info/bin/deploy.sh
47
+ fi
48
+
32
49
echo " Starting application"
33
50
start_app
51
+
52
+ echo " Calling post_deploy"
53
+ if [ -e ${CARTRIDGE_BASE_PATH} /${primary_framework_cart} /info/bin/post_deploy.sh ]; then
54
+ ${CARTRIDGE_BASE_PATH} /${primary_framework_cart} /info/bin/post_deploy.sh
55
+ else
56
+ ${CARTRIDGE_BASE_PATH} /abstract/info/bin/post_deploy.sh
57
+ fi
34
58
else
35
59
echo " can_rollback returned nonzero exit - unable to rollback"
36
60
exit 1
You can’t perform that action at this time.
0 commit comments