Repository: cayenne Updated Branches: refs/heads/STABLE-4.0 f6ba5e14d -> 2f22b1e5b
Added sqlserver-docker profile to tests on SQLServer Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/35570124 Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/35570124 Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/35570124 Branch: refs/heads/STABLE-4.0 Commit: 355701246e7f9765c24c0f86ae3c93297cb0b49d Parents: ba14147 Author: Maxim Petrusevich <maks1...@gmail.com> Authored: Fri Jan 19 13:40:28 2018 +0300 Committer: Maxim Petrusevich <maks1...@gmail.com> Committed: Fri Jan 19 13:40:28 2018 +0300 ---------------------------------------------------------------------- .travis.yml | 1 + cayenne-client/pom.xml | 33 ++++++++++++++++++ cayenne-dbsync/pom.xml | 33 ++++++++++++++++++ cayenne-jcache/pom.xml | 33 ++++++++++++++++++ cayenne-server/pom.xml | 33 ++++++++++++++++++ pom.xml | 81 +++++++++++++++++++++++++++++++++++++-------- 6 files changed, 201 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cayenne/blob/35570124/.travis.yml ---------------------------------------------------------------------- diff --git a/.travis.yml b/.travis.yml index 4101ebd..6151ad1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,7 @@ env: - DB_PROFILE=derby - DB_PROFILE=mysql-docker - DB_PROFILE=postgres-docker + - DB_PROFILE=sqlserver-docker jdk: - oraclejdk8 http://git-wip-us.apache.org/repos/asf/cayenne/blob/35570124/cayenne-client/pom.xml ---------------------------------------------------------------------- diff --git a/cayenne-client/pom.xml b/cayenne-client/pom.xml index 3dcc4fe..c6c5257 100644 --- a/cayenne-client/pom.xml +++ b/cayenne-client/pom.xml @@ -165,6 +165,39 @@ </build> </profile> <profile> + <id>sqlserver-docker</id> + <activation> + <property> + <name>cayenneTestConnection</name> + <value>sqlserver-docker</value> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <executions> + <execution> + <id>start-sqlserver</id> + <phase>pre-integration-test</phase> + <goals> + <goal>start</goal> + </goals> + </execution> + <execution> + <id>stop-sqlserver</id> + <phase>post-integration-test</phase> + <goals> + <goal>stop</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + <profile> <id>code-quality</id> <activation> http://git-wip-us.apache.org/repos/asf/cayenne/blob/35570124/cayenne-dbsync/pom.xml ---------------------------------------------------------------------- diff --git a/cayenne-dbsync/pom.xml b/cayenne-dbsync/pom.xml index d3db3d3..c179a4a 100644 --- a/cayenne-dbsync/pom.xml +++ b/cayenne-dbsync/pom.xml @@ -201,5 +201,38 @@ </plugins> </build> </profile> + <profile> + <id>sqlserver-docker</id> + <activation> + <property> + <name>cayenneTestConnection</name> + <value>sqlserver-docker</value> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <executions> + <execution> + <id>start-sqlserver</id> + <phase>pre-integration-test</phase> + <goals> + <goal>start</goal> + </goals> + </execution> + <execution> + <id>stop-sqlserver</id> + <phase>post-integration-test</phase> + <goals> + <goal>stop</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> </profiles> </project> http://git-wip-us.apache.org/repos/asf/cayenne/blob/35570124/cayenne-jcache/pom.xml ---------------------------------------------------------------------- diff --git a/cayenne-jcache/pom.xml b/cayenne-jcache/pom.xml index e5670ba..6d74d05 100644 --- a/cayenne-jcache/pom.xml +++ b/cayenne-jcache/pom.xml @@ -188,6 +188,39 @@ </plugins> </build> </profile> + <profile> + <id>sqlserver-docker</id> + <activation> + <property> + <name>cayenneTestConnection</name> + <value>sqlserver-docker</value> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <executions> + <execution> + <id>start-sqlserver</id> + <phase>pre-integration-test</phase> + <goals> + <goal>start</goal> + </goals> + </execution> + <execution> + <id>stop-sqlserver</id> + <phase>post-integration-test</phase> + <goals> + <goal>stop</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> </profiles> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne/blob/35570124/cayenne-server/pom.xml ---------------------------------------------------------------------- diff --git a/cayenne-server/pom.xml b/cayenne-server/pom.xml index 0249026..6a755c4 100644 --- a/cayenne-server/pom.xml +++ b/cayenne-server/pom.xml @@ -301,6 +301,39 @@ </plugins> </build> </profile> + <profile> + <id>sqlserver-docker</id> + <activation> + <property> + <name>cayenneTestConnection</name> + <value>sqlserver-docker</value> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <executions> + <execution> + <id>start-sqlserver</id> + <phase>pre-integration-test</phase> + <goals> + <goal>start</goal> + </goals> + </execution> + <execution> + <id>stop-sqlserver</id> + <phase>post-integration-test</phase> + <goals> + <goal>stop</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> <profile> <id>code-quality</id> http://git-wip-us.apache.org/repos/asf/cayenne/blob/35570124/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 58e673f..2402538 100644 --- a/pom.xml +++ b/pom.xml @@ -821,7 +821,7 @@ <plugin> <groupId>io.fabric8</groupId> <artifactId>docker-maven-plugin</artifactId> - <version>0.15.6</version> + <version>0.23.0</version> </plugin> </plugins> </pluginManagement> @@ -1347,12 +1347,8 @@ <port>${db.host}:${db.port}:3306</port> </ports> <wait> - <tcp> - <ports> - <port>3306</port> - </ports> - </tcp> - <time>30000</time> + <log>MySQL init process done. Ready for start up.</log> + <time>60000</time> </wait> <env> <MYSQL_ALLOW_EMPTY_PASSWORD>yes</MYSQL_ALLOW_EMPTY_PASSWORD> @@ -1449,12 +1445,8 @@ <port>${db.host}:${db.port}:5432</port> </ports> <wait> - <tcp> - <ports> - <port>5432</port> - </ports> - </tcp> - <time>30000</time> + <log>PostgreSQL init process complete; ready for start up.</log> + <time>60000</time> </wait> </run> </image> @@ -1465,6 +1457,69 @@ </build> </profile> <profile> + <id>sqlserver-docker</id> + <activation> + <property> + <name>cayenneTestConnection</name> + <value>sqlserver-docker</value> + </property> + </activation> + <dependencies> + <dependency> + <groupId>com.microsoft.sqlserver</groupId> + <artifactId>mssql-jdbc</artifactId> + <version>6.1.0.jre7</version> + <scope>test</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-failsafe-plugin</artifactId> + <configuration> + <systemPropertyVariables> + <!-- ${db.host} and ${db.port} are dynamically set by docker-maven-plugin below --> + <cayenneAdapter>org.apache.cayenne.dba.sqlserver.SQLServerAdapter</cayenneAdapter> + <cayenneJdbcUsername>sa</cayenneJdbcUsername> + <cayenneJdbcPassword>Cayenne#123</cayenneJdbcPassword> + <cayenneJdbcUrl>jdbc:sqlserver://${sqlserver.host}:${sqlserver.port};</cayenneJdbcUrl> + <cayenneJdbcDriver>com.microsoft.sqlserver.jdbc.SQLServerDriver</cayenneJdbcDriver> + <cayenne.runtime.db.collation.assume.ci>true</cayenne.runtime.db.collation.assume.ci> + </systemPropertyVariables> + </configuration> + </plugin> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <configuration> + <verbose>true</verbose> + <images> + <image> + <alias>sqlserver</alias> + <name>microsoft/mssql-server-linux:2017-latest</name> + <run> + <ports> + <port>${sqlserver.host}:${sqlserver.port}:1433</port> + </ports> + <env> + <ACCEPT_EULA>Y</ACCEPT_EULA> + <SA_PASSWORD>Cayenne#123</SA_PASSWORD> + </env> + <wait> + <log>SQL Server is now ready for client connections.</log> + <time>60000</time> + </wait> + <cmd>/opt/mssql/bin/sqlservr</cmd> + </run> + </image> + </images> + </configuration> + </plugin> + </plugins> + </build> + </profile> + <profile> <id>derby</id> <activation> <property>