KEYCLOAK-6119 Create CI job for Postgres with schema

This commit is contained in:
Martin Kanis 2018-08-02 15:18:45 +02:00 committed by Hynek Mlnařík
parent fb58214fcc
commit ee8c35a48e
2 changed files with 23 additions and 0 deletions

View file

@ -25,6 +25,7 @@
<xsl:variable name="nsDS" select="'urn:jboss:domain:datasources:'"/>
<xsl:variable name="nsKS" select="'urn:jboss:domain:keycloak-server'"/>
<!-- Remove keycloak datasource definition. -->
<xsl:template match="//*[local-name()='subsystem' and starts-with(namespace-uri(), $nsDS)]
@ -34,6 +35,7 @@
<xsl:param name="db.jdbc_url"/>
<xsl:param name="driver"/>
<xsl:param name="schema"/>
<xsl:param name="min.poolsize" select="'10'"/>
<xsl:param name="max.poolsize" select="'50'"/>
@ -72,6 +74,12 @@
</datasource>
</xsl:variable>
<xsl:variable name="newSchemaDefinition">
<xsl:if test="$schema != 'DEFAULT'">
<property name="schema" value="{$schema}"/>
</xsl:if>
</xsl:variable>
<xsl:variable name="newDriverDefinition">
<xsl:if test="$driver != 'h2'">
<driver name="{$driver}" module="test.jdbc.{$driver}" />
@ -97,6 +105,16 @@
</xsl:copy>
</xsl:template>
<xsl:template match="//*[local-name()='subsystem' and starts-with(namespace-uri(), $nsKS)]
/*[local-name()='spi' and starts-with(namespace-uri(), $nsKS) and @name='connectionsJpa']
/*[local-name()='provider' and starts-with(namespace-uri(), $nsKS)]
/*[local-name()='properties' and starts-with(namespace-uri(), $nsKS)]">
<xsl:copy>
<xsl:copy-of select="$newSchemaDefinition"/>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>
<!-- Copy everything else. -->
<xsl:template match="@*|node()">
<xsl:copy>

View file

@ -361,6 +361,7 @@
<properties>
<jdbc.mvn.driver.deployment.dir>${auth.server.home}/modules/system/layers/base/test/jdbc/${jdbc.mvn.artifactId}/main</jdbc.mvn.driver.deployment.dir>
<skip.h2.tcp>true</skip.h2.tcp>
<keycloak.connectionsJpa.schema>DEFAULT</keycloak.connectionsJpa.schema>
</properties>
<build>
<pluginManagement>
@ -479,6 +480,10 @@
<name>password</name>
<value>${keycloak.connectionsJpa.password}</value>
</parameter>
<parameter>
<name>schema</name>
<value>${keycloak.connectionsJpa.schema}</value>
</parameter>
</parameters>
</transformationSet>
<!-- add logger for org.hibernate.dialect.Dialect -->