From 60ef910b5bd139eee7b3c42c38735c426550e447 Mon Sep 17 00:00:00 2001 From: Pavel Drozd Date: Thu, 18 May 2017 23:47:12 +0200 Subject: [PATCH] KEYCLOAK-4931 - install patch available from http --- .../app-server/jboss/common/install-patch.bat | 19 ++++++++++++------- .../app-server/jboss/common/install-patch.sh | 5 +++++ .../jboss/common/install-patch.bat | 19 ++++++++++++------- .../auth-server/jboss/common/install-patch.sh | 5 +++++ 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/common/install-patch.bat b/testsuite/integration-arquillian/servers/app-server/jboss/common/install-patch.bat index ee0ed4fdbd..5c7ce9fd7e 100644 --- a/testsuite/integration-arquillian/servers/app-server/jboss/common/install-patch.bat +++ b/testsuite/integration-arquillian/servers/app-server/jboss/common/install-patch.bat @@ -1,9 +1,14 @@ set NOPAUSE=true +setlocal EnableDelayedExpansion -for %%a in ("%APP_PATCH_ZIPS:,=" "%") do ( - call %JBOSS_HOME%\bin\jboss-cli.bat --command="patch apply %%~a" - - if %ERRORLEVEL% neq 0 set ERROR=%ERRORLEVEL% -) - -exit /b %ERROR% \ No newline at end of file + for %%a in (%APP_PATCH_ZIPS%) do ( + set patch=%%a + if "!patch:~0,4!"=="http" ( + powershell -command "& { iwr %%a -OutFile %cd%\patch.zip }" + call %JBOSS_HOME%\bin\jboss-cli.bat --command="patch apply %cd%\patch.zip + ) else ( + call %JBOSS_HOME%\bin\jboss-cli.bat --command="patch apply %%a" + ) + if %ERRORLEVEL% neq 0 set ERROR=%ERRORLEVEL% + ) + exit /b %ERROR% \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/common/install-patch.sh b/testsuite/integration-arquillian/servers/app-server/jboss/common/install-patch.sh index eb23344bee..bf091d5845 100755 --- a/testsuite/integration-arquillian/servers/app-server/jboss/common/install-patch.sh +++ b/testsuite/integration-arquillian/servers/app-server/jboss/common/install-patch.sh @@ -12,6 +12,11 @@ RESULT=0 patches=$(echo $APP_PATCH_ZIPS | tr "," "\n") for patch in $patches do + if [[ $patch == http* ]]; + then + wget -O ./patch.zip $patch >/dev/null 2>&1 + patch=./patch.zip + fi ./jboss-cli.sh --command="patch apply $patch" if [ $? -ne 0 ]; then exit 1; fi done diff --git a/testsuite/integration-arquillian/servers/auth-server/jboss/common/install-patch.bat b/testsuite/integration-arquillian/servers/auth-server/jboss/common/install-patch.bat index ee0ed4fdbd..d1c48aeb5e 100644 --- a/testsuite/integration-arquillian/servers/auth-server/jboss/common/install-patch.bat +++ b/testsuite/integration-arquillian/servers/auth-server/jboss/common/install-patch.bat @@ -1,9 +1,14 @@ set NOPAUSE=true +setlocal EnableDelayedExpansion -for %%a in ("%APP_PATCH_ZIPS:,=" "%") do ( - call %JBOSS_HOME%\bin\jboss-cli.bat --command="patch apply %%~a" - - if %ERRORLEVEL% neq 0 set ERROR=%ERRORLEVEL% -) - -exit /b %ERROR% \ No newline at end of file + for %%a in (%AUTH_PATCH_ZIPS%) do ( + set patch=%%a + if "!patch:~0,4!"=="http" ( + powershell -command "& { iwr %%a -OutFile %cd%\patch.zip }" + call %JBOSS_HOME%\bin\jboss-cli.bat --command="patch apply %cd%\patch.zip + ) else ( + call %JBOSS_HOME%\bin\jboss-cli.bat --command="patch apply %%a" + ) + if %ERRORLEVEL% neq 0 set ERROR=%ERRORLEVEL% + ) + exit /b %ERROR% \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/auth-server/jboss/common/install-patch.sh b/testsuite/integration-arquillian/servers/auth-server/jboss/common/install-patch.sh index 3d1820b2bb..f1dff06ea3 100755 --- a/testsuite/integration-arquillian/servers/auth-server/jboss/common/install-patch.sh +++ b/testsuite/integration-arquillian/servers/auth-server/jboss/common/install-patch.sh @@ -12,6 +12,11 @@ RESULT=0 patches=$(echo $AUTH_PATCH_ZIPS | tr "," "\n") for patch in $patches do + if [[ $patch == http* ]]; + then + wget -O ./patch.zip $patch >/dev/null 2>&1 + patch=./patch.zip + fi ./jboss-cli.sh --command="patch apply $patch" if [ $? -ne 0 ]; then exit 1; fi done