I have a rather simple deployment script for wildfly 10 cli:
try
deploy dummy.war --server-groups=main-server-group
catch
deploy dummy.war --force
end-try
The script is run from a bash script. The problem is that the bash script always returns 1 if the first deploy fails. The deployment in the catch block is executed fine. The return code however breaks the build, so I need a solution for that.
I'd like to build a deployment script which works regardless of the current deployment state of dummy.war.
Any ideas how to make it work?
Thanks!