You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2020/07/31 09:24:41 UTC

[james-project] 20/28: JAMES-3350 Building mock-smtp-server image should be optional

This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit c6e378a8c4a2872302960db6371f18abbb018961
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Tue Jul 28 10:12:56 2020 +0700

    JAMES-3350 Building mock-smtp-server image should be optional
    
    The build takes 19 minutes at compilation time, and at testing time to build this
    JIB image.
    
    The current build builds a TAR that is never loaded into the docker daemon, thus never used.
    
    We should make JIB image building optional. We should let the opportunity to use the docker daemon instead of building to a TAR.
    
    This change unlocks a 36 minutes build time improvement.
---
 server/mailet/mock-smtp-server/README.adoc |  8 ++++++--
 server/mailet/mock-smtp-server/pom.xml     | 26 --------------------------
 2 files changed, 6 insertions(+), 28 deletions(-)

diff --git a/server/mailet/mock-smtp-server/README.adoc b/server/mailet/mock-smtp-server/README.adoc
index e967238..52bbce8 100644
--- a/server/mailet/mock-smtp-server/README.adoc
+++ b/server/mailet/mock-smtp-server/README.adoc
@@ -6,13 +6,17 @@ This is our custom made Mock SMTP server that we use for some of our tests in Ja
 
 Compile and build the image into a tarball with maven:
 
-    $ mvn package
+    $ mvn compile jib:buildTar
 
 *Note* : You can add the option '-DskipTests' if you want to skip tests
 
 After Jib created the image, you can load it into Docker with:
 
-    $ docker load --input target/jib-mock-smtp-server.tar
+    $ docker load --input target/jib-image.tar
+
+You can alternatively directly build your image directly to a Docker daemon. To to so:
+
+    $ mvn compile jib:dockerBuild
 
 Then run it with:
 
diff --git a/server/mailet/mock-smtp-server/pom.xml b/server/mailet/mock-smtp-server/pom.xml
index bc4d734..16e5711 100644
--- a/server/mailet/mock-smtp-server/pom.xml
+++ b/server/mailet/mock-smtp-server/pom.xml
@@ -137,32 +137,6 @@
                         </ports>
                     </container>
                 </configuration>
-                <executions>
-                    <execution>
-                        <id>docker packaging</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>buildTar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>com.coderplus.maven.plugins</groupId>
-                <artifactId>copy-rename-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>copy-file</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>rename</goal>
-                        </goals>
-                        <configuration>
-                            <sourceFile>${basedir}/target/jib-image.tar</sourceFile>
-                            <destinationFile>${basedir}/target/jib-mock-smtp-server.tar</destinationFile>
-                        </configuration>
-                    </execution>
-                </executions>
             </plugin>
         </plugins>
     </build>


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org