Merge pull request #4821 from mhajas/KEYCLOAK-6005

KEYCLOAK-6005 Fail build when adapters installation fails
This commit is contained in:
Pavel Drozd 2017-12-12 00:09:45 +01:00 committed by GitHub
commit 20f8e5e572
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,30 +23,33 @@ do
echo "Server is running. Installing adapter."
./jboss-cli.sh -c --file="adapter-install.cli"
RESULT=$?
echo "Return code of adapter-install:"${RESULT}
if [ "$ELYTRON_SUPPORTED" = true ]; then
if [ "$ELYTRON_SUPPORTED" = true ] && [ ${RESULT} -eq 0 ]; then
echo "Installing elytron adapter."
./jboss-cli.sh -c --file="adapter-elytron-install.cli"
RESULT=$?
else
./jboss-cli.sh -c --file="$CLI_PATH/remove-elytron-subsystem.cli"
fi
if [ $? -ne 0 ]; then RESULT=1; fi
if [ "$SAML_SUPPORTED" = true ]; then
if [ "$SAML_SUPPORTED" = true ] && [ ${RESULT} -eq 0 ]; then
./jboss-cli.sh -c --file="adapter-install-saml.cli"
RESULT=$?
echo "Return code of saml adapter-install:"$RESULT
if [ "$ELYTRON_SUPPORTED" = true ]; then
if [ "$ELYTRON_SUPPORTED" = true ] && [ ${RESULT} -eq 0 ]; then
./jboss-cli.sh -c --file="adapter-elytron-install-saml.cli"
RESULT=$?
fi
if [ $? -ne 0 ]; then RESULT=1; fi
fi
./jboss-cli.sh -c --command=":shutdown"
rm -rf $JBOSS_HOME/standalone/data
rm -rf $JBOSS_HOME/standalone/log
echo "Exiting with return code: "$RESULT
exit $RESULT
fi
echo "Server is not running."