Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 2b89c068 by Tony CHEMIT at 2017-09-05T23:43:00+02:00 move some tests + use new pom and new deploy layout - - - - - 12 changed files: - .gitlab-ci.yml - CHANGELOG.md - observe/pom.xml - pom.xml - server-configuration/pom.xml - server/src/test/java/fr/ird/observe/server/configuration/db/ObserveWebDatabasesHelperTest.java → server-configuration/src/test/java/fr/ird/observe/server/configuration/db/ObserveWebDatabasesHelperTest.java - server/src/test/java/fr/ird/observe/server/configuration/user/ObserveWebUsersHelperTest.java → server-configuration/src/test/java/fr/ird/observe/server/configuration/user/ObserveWebUsersHelperTest.java - server/src/test/resources/observeweb-test.conf → server-configuration/src/test/resources/observeweb-test.conf - − server/src/test/java/fr/ird/observe/server/controller/v1/ClassMappingRestApiTest.java - services-client/src/main/java/fr/ird/observe/services/client/ObserveServiceFactoryClient.java - − services-client/src/test/java/fr/ird/observe/services/client/ClassMappingClientTest.java - services-local/src/main/java/fr/ird/observe/services/local/ObserveServiceFactoryLocal.java Changes: ===================================== .gitlab-ci.yml ===================================== --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -77,10 +77,22 @@ stage: - apt-get update -y && apt-get install libc6-i386 libx32stdc++6 -y - close-milestone.sh - create-stage.sh - - close-stage.sh + - drop-stage.sh - update-staging-changelog.sh - create-milestone.sh +release: + <<: *env_staging + <<: *test_manual + <<: *before_script_clone + script: + - apt-get update -y && apt-get install libc6-i386 libx32stdc++6 -y + - close-milestone.sh + - create-stage.sh + - close-and-release-stage.sh + - update-changelog.sh + - create-milestone.sh + deploy-snapshot: <<: *env_staging <<: *test_manual @@ -138,13 +150,13 @@ staging-site: <<: *staging <<: *deploy_site -release: +stage-release: <<: *staging when: manual script: - release-stage.sh -drop: +stage-drop: <<: *staging when: manual script: ===================================== CHANGELOG.md ===================================== The diff for this file was not included because it is too large. ===================================== observe/pom.xml ===================================== --- a/observe/pom.xml +++ b/observe/pom.xml @@ -20,7 +20,8 @@ <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> @@ -104,6 +105,40 @@ </executions> </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>wagon-maven-plugin</artifactId> + <configuration> + <serverId>doc.ultreia.io</serverId> + <url>scpexe://ultreia.io/var/www/observe/release</url> + </configuration> + <executions> + <execution> + <phase>deploy</phase> + <id>deploy-zip</id> + <goals> + <goal>upload-single</goal> + </goals> + <configuration> + <fromFile>${project.build.directory}/client-${project.version}.zip</fromFile> + <toFile>observe-${project.version}.zip</toFile> + </configuration> + </execution> + <execution> + <phase>deploy</phase> + <id>deploy-war</id> + <goals> + <goal>upload-single</goal> + </goals> + <configuration> + <fromFile>${project.build.directory}/server-${project.version}.war</fromFile> + <toFile>observe-${project.version}.war</toFile> + </configuration> + </execution> + </executions> + </plugin> + + </plugins> </build> </project> ===================================== pom.xml ===================================== --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>io.ultreia.maven</groupId> <artifactId>pom</artifactId> - <version>24</version> + <version>25</version> </parent> <groupId>fr.ird.observe</groupId> @@ -164,7 +164,7 @@ <nuitonUtilsVersion>3.0-rc-18</nuitonUtilsVersion> <nuitonConverterVersion>1.0</nuitonConverterVersion> <nuitonVersionVersion>1.0-rc-2</nuitonVersionVersion> - <httpVersion>1.0.6</httpVersion> + <httpVersion>1.0.7</httpVersion> <xworkVersion>2.3.33</xworkVersion> <flexmarkVersion>0.26.4</flexmarkVersion> <hibernateVersion>5.1.9.Final</hibernateVersion> @@ -176,6 +176,8 @@ <geoToolsVersion>17.2</geoToolsVersion> <guavaVersion>23.0</guavaVersion> + <gitlabPluginVersion>1.0.12-SNAPSHOT</gitlabPluginVersion> + <!-- license header configuration --> <license.licenseName>gpl_v3</license.licenseName> <license.organizationName>IRD, Code Lutin, Ultreia.io</license.organizationName> @@ -199,6 +201,7 @@ <gitlab.changesTitle>ObServe changelog</gitlab.changesTitle> <gitlab.trackers>Anomalie,Evolution,Tâche</gitlab.trackers> <gitlab.fromMilestone>5.0</gitlab.fromMilestone> + <gitlab.stagingUrl>https://observe.ultreia.io/release</gitlab.stagingUrl> <!-- deploy nothing --> <maven.deploy.skip>true</maven.deploy.skip> @@ -857,31 +860,6 @@ </plugin> <plugin> - <artifactId>maven-enforcer-plugin</artifactId> - <executions> - <execution> - <id>enforce-maven</id> - <goals> - <goal>enforce</goal> - </goals> - <inherited>true</inherited> - <phase>initialize</phase> - <configuration> - <rules> - <requireMavenVersion> - <version>3.5.0</version> - </requireMavenVersion> - </rules> - <ignoreCache>true</ignoreCache> - <failFast>true</failFast> - <fail>true</fail> - - </configuration> - </execution> - </executions> - </plugin> - - <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>buildnumber-maven-plugin</artifactId> <executions> @@ -1009,18 +987,21 @@ <configuration> <releaseArtifacts> <releaseArtifact> + <flatLayout>true</flatLayout> <groupId>fr.ird.observe</groupId> <artifactId>observe</artifactId> <name>Application</name> <type>zip</type> </releaseArtifact> <releaseArtifact> + <flatLayout>true</flatLayout> <groupId>fr.ird.observe</groupId> <artifactId>observe</artifactId> <name>Serveur</name> <type>war</type> </releaseArtifact> </releaseArtifacts> + </configuration> </plugin> ===================================== server-configuration/pom.xml ===================================== --- a/server-configuration/pom.xml +++ b/server-configuration/pom.xml @@ -99,6 +99,20 @@ <scope>compile</scope> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-jcl</artifactId> + <scope>test</scope> + </dependency> + + <!-- test dependencies --> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> + + </dependencies> <build> ===================================== server/src/test/java/fr/ird/observe/server/configuration/db/ObserveWebDatabasesHelperTest.java → server-configuration/src/test/java/fr/ird/observe/server/configuration/db/ObserveWebDatabasesHelperTest.java ===================================== --- a/server/src/test/java/fr/ird/observe/server/configuration/db/ObserveWebDatabasesHelperTest.java +++ b/server-configuration/src/test/java/fr/ird/observe/server/configuration/db/ObserveWebDatabasesHelperTest.java @@ -92,7 +92,7 @@ public class ObserveWebDatabasesHelperTest { public void setUp() throws IOException { java.nio.file.Files.createDirectories(new File(System.getProperty("java.io.tmpdir")).toPath()); - configuration = new ServerConfig("observeweb-test.conf"); + configuration = new ServerConfig("src/main/test/resources/observeweb-test.conf"); configuration.setBaseDirectory(Files.createTempDir()); configuration.init(); observeWebDatabasesHelper = new ObserveWebDatabasesHelper(); ===================================== server/src/test/java/fr/ird/observe/server/configuration/user/ObserveWebUsersHelperTest.java → server-configuration/src/test/java/fr/ird/observe/server/configuration/user/ObserveWebUsersHelperTest.java ===================================== --- a/server/src/test/java/fr/ird/observe/server/configuration/user/ObserveWebUsersHelperTest.java +++ b/server-configuration/src/test/java/fr/ird/observe/server/configuration/user/ObserveWebUsersHelperTest.java @@ -77,7 +77,7 @@ public class ObserveWebUsersHelperTest { public void setUp() throws Exception { java.nio.file.Files.createDirectories(new File(System.getProperty("java.io.tmpdir")).toPath()); - configuration = new ServerConfig("observeweb-test.conf"); + configuration = new ServerConfig("src/main/test/resources/observeweb-test.conf"); configuration.setBaseDirectory(Files.createTempDir()); configuration.init(); observeWebUsersHelper = new ObserveWebUsersHelper(); ===================================== server/src/test/resources/observeweb-test.conf → server-configuration/src/test/resources/observeweb-test.conf ===================================== ===================================== server/src/test/java/fr/ird/observe/server/controller/v1/ClassMappingRestApiTest.java deleted ===================================== --- a/server/src/test/java/fr/ird/observe/server/controller/v1/ClassMappingRestApiTest.java +++ /dev/null @@ -1,36 +0,0 @@ -package fr.ird.observe.server.controller.v1; - -/*- - * #%L - * ObServe :: Server - * %% - * Copyright (C) 2008 - 2017 IRD, Code Lutin, Ultreia.io - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ - -import javax.annotation.Generated; -import org.junit.Test; - -@Generated(value = "io.ultreia.java4all.http.maven.plugin.GenerateHttpApiMojo", date = "Sun Jul 16 14:27:04 CEST 2017") -public class ClassMappingRestApiTest { - - @Test - public void test() { - new ClassMappingRestApi(); - } - -} ===================================== services-client/src/main/java/fr/ird/observe/services/client/ObserveServiceFactoryClient.java ===================================== --- a/services-client/src/main/java/fr/ird/observe/services/client/ObserveServiceFactoryClient.java +++ b/services-client/src/main/java/fr/ird/observe/services/client/ObserveServiceFactoryClient.java @@ -59,7 +59,7 @@ public class ObserveServiceFactoryClient extends ObserveServiceFactorySupport im } }); - private final static ClassMappingClient CLASS_MAPPING = new ClassMappingClient(); + private final static ClassMappingClient CLASS_MAPPING = ClassMappingClient.get(); @Override public <S extends ObserveService> boolean accept(ObserveDataSourceConfiguration dataSourceConfiguration, Class<S> serviceType) { ===================================== services-client/src/test/java/fr/ird/observe/services/client/ClassMappingClientTest.java deleted ===================================== --- a/services-client/src/test/java/fr/ird/observe/services/client/ClassMappingClientTest.java +++ /dev/null @@ -1,36 +0,0 @@ -package fr.ird.observe.services.client; - -/*- - * #%L - * ObServe :: Services client implementation - * %% - * Copyright (C) 2008 - 2017 IRD, Code Lutin, Ultreia.io - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ - -import javax.annotation.Generated; -import org.junit.Test; - -@Generated(value = "io.ultreia.java4all.http.maven.plugin.GenerateHttpClientMojo", date = "Fri Sep 01 17:24:34 CEST 2017") -public class ClassMappingClientTest { - - @Test - public void test() { - new ClassMappingClient(); - } - -} ===================================== services-local/src/main/java/fr/ird/observe/services/local/ObserveServiceFactoryLocal.java ===================================== --- a/services-local/src/main/java/fr/ird/observe/services/local/ObserveServiceFactoryLocal.java +++ b/services-local/src/main/java/fr/ird/observe/services/local/ObserveServiceFactoryLocal.java @@ -61,7 +61,7 @@ public class ObserveServiceFactoryLocal extends ObserveServiceFactorySupport { /** Logger. */ private static final Log log = LogFactory.getLog(ObserveServiceFactoryLocal.class); private static final TimeLog TIME_LOG = new TimeLog(ObserveServiceFactoryLocal.class, 500, 1000); - private static final ClassMappingLocal CLASS_MAPPING = new ClassMappingLocal(); + private static final ClassMappingLocal CLASS_MAPPING = ClassMappingLocal.get(); @Override public <S extends ObserveService> boolean accept(ObserveDataSourceConfiguration dataSourceConfiguration, Class<S> serviceType) { View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/2b89c068354373ce6314178f6a25... --- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/2b89c068354373ce6314178f6a25... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT