KEYCLOAK-7267 change a way how to install adapters in testsuite from online to offline scripts
This commit is contained in:
parent
db60abc604
commit
f293ab86c3
11 changed files with 190 additions and 114 deletions
|
@ -1 +1,4 @@
|
|||
/subsystem=logging/logger=org.keycloak.adapters:add(level=DEBUG)
|
||||
embed-server --server-config=${server.config:standalone.xml}
|
||||
|
||||
/subsystem=logging/logger=org.keycloak.adapters:add(level=DEBUG)
|
||||
/subsystem=logging/console-handler=CONSOLE:change-log-level(level=DEBUG)
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
if (outcome == success) of /subsystem=elytron/:read-resource
|
||||
echo Removing Elytron subsystem
|
||||
/subsystem=elytron/:remove
|
||||
echo
|
||||
end-if
|
|
@ -29,23 +29,6 @@ if %ERROR% neq 0 (
|
|||
goto shutdown_jboss
|
||||
)
|
||||
|
||||
if "%ELYTRON_SUPPORTED%" == "true" (
|
||||
call %JBOSS_HOME%\bin\jboss-cli.bat -c --file="%JBOSS_HOME%\bin\adapter-elytron-install.cli"
|
||||
set ERROR=%ERRORLEVEL%
|
||||
echo Installation of elytron ended with error code: "%ERROR%"
|
||||
if %ERROR% neq 0 (
|
||||
goto shutdown_jboss
|
||||
)
|
||||
) else (
|
||||
call %JBOSS_HOME%\bin\jboss-cli.bat -c --file="%CLI_PATH%\remove-elytron-subsystem.cli"
|
||||
set ERROR=%ERRORLEVEL%
|
||||
echo Removing elytron subsystem ended with error code: "%ERROR%"
|
||||
if %ERROR% neq 0 (
|
||||
goto shutdown_jboss
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
if "%SAML_SUPPORTED%" == "true" (
|
||||
call %JBOSS_HOME%\bin\jboss-cli.bat -c --file="%JBOSS_HOME%\bin\adapter-install-saml.cli"
|
||||
set ERROR=%ERRORLEVEL%
|
||||
|
@ -53,19 +36,8 @@ if "%SAML_SUPPORTED%" == "true" (
|
|||
if %ERROR% neq 0 (
|
||||
goto shutdown_jboss
|
||||
)
|
||||
|
||||
if "%ELYTRON_SUPPORTED%" == "true" (
|
||||
call %JBOSS_HOME%\bin\jboss-cli.bat -c --file="%JBOSS_HOME%\bin\adapter-elytron-install-saml.cli"
|
||||
set ERROR=%ERRORLEVEL%
|
||||
echo Installation of saml elytron ended with error code: "%ERROR%"
|
||||
if %ERROR% neq 0 (
|
||||
goto shutdown_jboss
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
call %JBOSS_HOME%\bin\jboss-cli.bat -c --file="%CLI_PATH%\add-adapter-log-level.cli"
|
||||
|
||||
:shutdown_jboss
|
||||
echo Shutting down with error code: "%ERROR%"
|
||||
call %JBOSS_HOME%\bin\jboss-cli.bat -c --command=":shutdown"
|
|
@ -26,27 +26,12 @@ do
|
|||
RESULT=$?
|
||||
echo "Return code of adapter-install:"${RESULT}
|
||||
|
||||
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 [ "$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 ] && [ ${RESULT} -eq 0 ]; then
|
||||
./jboss-cli.sh -c --file="adapter-elytron-install-saml.cli"
|
||||
RESULT=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
./jboss-cli.sh -c --file="$CLI_PATH/add-adapter-log-level.cli"
|
||||
|
||||
./jboss-cli.sh -c --command=":shutdown"
|
||||
rm -rf $JBOSS_HOME/standalone/data
|
||||
rm -rf $JBOSS_HOME/standalone/log
|
|
@ -39,6 +39,8 @@
|
|||
|
||||
<app.server.oidc.adapter.artifactId>keycloak-wildfly-adapter-dist</app.server.oidc.adapter.artifactId>
|
||||
<app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId>
|
||||
|
||||
<skip.elytron.adapter.installation>false</skip.elytron.adapter.installation>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -62,6 +62,28 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>install-adapters-online</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>${common.resources}/install-adapters-online.${script.suffix}</executable>
|
||||
<workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
|
||||
<environmentVariables>
|
||||
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
|
||||
<JBOSS_HOME>${app.server.jboss.home}</JBOSS_HOME>
|
||||
<SAML_SUPPORTED>${app.server.saml.adapter.supported}</SAML_SUPPORTED>
|
||||
</environmentVariables>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
@ -37,7 +37,8 @@
|
|||
<security.xslt>security.xsl</security.xslt>
|
||||
<oidc-adapter.version>${project.version}</oidc-adapter.version>
|
||||
<saml-adapter.version>${project.version}</saml-adapter.version>
|
||||
<app.server.elytron.adapter.supported>false</app.server.elytron.adapter.supported>
|
||||
<skip.elytron.adapter.installation>true</skip.elytron.adapter.installation>
|
||||
<skip.adapter.offline.installation>true</skip.adapter.offline.installation>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
|
@ -196,21 +197,166 @@
|
|||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>install-adapters</id>
|
||||
<id>add-adapter-log-level-standalone</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>${common.resources}/install-adapters.${script.suffix}</executable>
|
||||
<executable>./jboss-cli.${script.suffix}</executable>
|
||||
<workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
|
||||
<environmentVariables>
|
||||
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
|
||||
<JBOSS_HOME>${app.server.jboss.home}</JBOSS_HOME>
|
||||
<SAML_SUPPORTED>${app.server.saml.adapter.supported}</SAML_SUPPORTED>
|
||||
<ELYTRON_SUPPORTED>${app.server.elytron.adapter.supported}</ELYTRON_SUPPORTED>
|
||||
<CLI_PATH>${common.resources}/cli</CLI_PATH>
|
||||
</environmentVariables>
|
||||
<arguments>
|
||||
<argument>--file=${common.resources}/cli/add-adapter-log-level.cli</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>add-adapter-log-level-standalone-ha</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>./jboss-cli.${script.suffix}</executable>
|
||||
<workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
|
||||
<arguments>
|
||||
<argument>--file=${common.resources}/cli/add-adapter-log-level.cli</argument>
|
||||
<argument>-Dserver.config=standalone-ha.xml</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<!--OIDC: eap, wf11-->
|
||||
<id>adapter-elytron-install-offline-standalone</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.elytron.adapter.installation}</skip>
|
||||
<executable>./jboss-cli.${script.suffix}</executable>
|
||||
<workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
|
||||
<arguments>
|
||||
<argument>--file=${app.server.jboss.home}/bin/adapter-elytron-install-offline.cli</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<!--OIDC: eap, wf11-->
|
||||
<id>adapter-elytron-install-offline-standalone-ha</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.elytron.adapter.installation}</skip>
|
||||
<executable>./jboss-cli.${script.suffix}</executable>
|
||||
<workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
|
||||
<arguments>
|
||||
<argument>--file=${app.server.jboss.home}/bin/adapter-elytron-install-offline.cli</argument>
|
||||
<argument>-Dserver.config=standalone-ha.xml</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<!--SAML: eap, wf11-->
|
||||
<id>adapter-elytron-install-saml-offline-standalone</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.elytron.adapter.installation}</skip>
|
||||
<executable>./jboss-cli.${script.suffix}</executable>
|
||||
<workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
|
||||
<arguments>
|
||||
<argument>--file=${app.server.jboss.home}/bin/adapter-elytron-install-saml-offline.cli</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<!--SAML: eap, wf11-->
|
||||
<id>adapter-elytron-install-saml-offline-standalone-ha</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.elytron.adapter.installation}</skip>
|
||||
<executable>./jboss-cli.${script.suffix}</executable>
|
||||
<workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
|
||||
<arguments>
|
||||
<argument>--file=${app.server.jboss.home}/bin/adapter-elytron-install-saml-offline.cli</argument>
|
||||
<argument>-Dserver.config=standalone-ha.xml</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<!--OIDC: wf10, wf9-->
|
||||
<id>adapter-install-offline-standalone</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.adapter.offline.installation}</skip>
|
||||
<executable>./jboss-cli.${script.suffix}</executable>
|
||||
<workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
|
||||
<arguments>
|
||||
<argument>--file=${app.server.jboss.home}/bin/adapter-install-offline.cli</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<!--OIDC: wf10, wf9-->
|
||||
<id>adapter-install-offline-standalone-ha</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.adapter.offline.installation}</skip>
|
||||
<executable>./jboss-cli.${script.suffix}</executable>
|
||||
<workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
|
||||
<arguments>
|
||||
<argument>--file=${app.server.jboss.home}/bin/adapter-install-offline.cli</argument>
|
||||
<argument>-Dserver.config=standalone-ha.xml</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<!--SAML: wf10, wf9-->
|
||||
<id>adapter-install-saml-offline-standalone</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.adapter.offline.installation}</skip>
|
||||
<executable>./jboss-cli.${script.suffix}</executable>
|
||||
<workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
|
||||
<arguments>
|
||||
<argument>--file=${app.server.jboss.home}/bin/adapter-install-saml-offline.cli</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<!--SAML: wf10, wf9-->
|
||||
<id>adapter-install-saml-offline-standalone-ha</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.adapter.offline.installation}</skip>
|
||||
<executable>./jboss-cli.${script.suffix}</executable>
|
||||
<workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
|
||||
<arguments>
|
||||
<argument>--file=${app.server.jboss.home}/bin/adapter-install-saml-offline.cli</argument>
|
||||
<argument>-Dserver.config=standalone-ha.xml</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
@ -417,17 +563,6 @@
|
|||
<module>eap6-fuse</module>
|
||||
</modules>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>app-server-wildfly-elytron</id>
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
<properties>
|
||||
<wildfly.version>${elytron.wildfly.version}</wildfly.version>
|
||||
<app.server.elytron.adapter.supported>true</app.server.elytron.adapter.supported>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
|
||||
<app.server.oidc.adapter.artifactId>keycloak-wildfly-adapter-dist</app.server.oidc.adapter.artifactId>
|
||||
<app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId>
|
||||
|
||||
<skip.elytron.adapter.installation>false</skip.elytron.adapter.installation>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
|
||||
<app.server.oidc.adapter.artifactId>keycloak-wildfly-adapter-dist</app.server.oidc.adapter.artifactId>
|
||||
<app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId>
|
||||
|
||||
<skip.adapter.offline.installation>false</skip.adapter.offline.installation>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
|
||||
<app.server.oidc.adapter.artifactId>keycloak-wildfly-adapter-dist</app.server.oidc.adapter.artifactId>
|
||||
<app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId>
|
||||
|
||||
<skip.adapter.offline.installation>false</skip.adapter.offline.installation>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -38,45 +38,8 @@
|
|||
<app.server.type>managed</app.server.type>
|
||||
<auth.server.actual.protocol>http</auth.server.actual.protocol>
|
||||
<auth.server.actual.http.port>${auth.server.http.port}</auth.server.actual.http.port>
|
||||
<keycloak.subsystem.xsl>keycloak-subsystem.xsl</keycloak.subsystem.xsl>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>xml-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>configure-keycloak-subsystem</id>
|
||||
<phase>process-test-resources</phase>
|
||||
<goals>
|
||||
<goal>transform</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<transformationSets>
|
||||
<transformationSet>
|
||||
<dir>${app.server.home}/standalone/configuration</dir>
|
||||
<includes>
|
||||
<include>standalone.xml</include>
|
||||
</includes>
|
||||
<stylesheet>${common.resources}/xslt/${keycloak.subsystem.xsl}</stylesheet>
|
||||
<outputDir>${app.server.home}/standalone/configuration</outputDir>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>auth-server-host</name>
|
||||
<value>${auth.server.actual.protocol}://localhost:${auth.server.actual.http.port}</value>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</transformationSet>
|
||||
</transformationSets>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>ssl</id>
|
||||
|
@ -92,13 +55,6 @@
|
|||
<auth.server.actual.http.port>${auth.server.https.port}</auth.server.actual.http.port>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>keycloak-subsystem-separate-realm</id>
|
||||
<properties>
|
||||
<!-- single realm definition, multiple secure-deployments -->
|
||||
<keycloak.subsystem.xsl>keycloak-subsystem_separate-realm-def.xsl</keycloak.subsystem.xsl>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>adapter-test-jboss-submodules</id>
|
||||
<activation>
|
||||
|
|
Loading…
Reference in a new issue