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

hxd pushed a commit to branch accelerate_github_action
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit eb0ace8a22ab72a92d3fd13122693169518f81ac
Author: xiangdong huang <[email protected]>
AuthorDate: Fri Jan 29 20:09:03 2021 +0800

    modify jenkinsfile to upload jar-with-dependencies
---
 .github/workflows/client.yml  |  2 +-
 .github/workflows/main-ci.yml | 15 ++++++++++--
 Jenkinsfile                   |  4 ++--
 cluster/pom.xml               | 14 ++++++++++++
 example/udf/pom.xml           | 47 +++++++++++++++++++++++---------------
 hadoop/pom.xml                | 47 ++++++++++++++++++++++----------------
 hive-connector/pom.xml        | 53 +++++++++++++++++++++++--------------------
 jdbc/pom.xml                  | 47 ++++++++++++++++++++++----------------
 pom.xml                       |  8 +++++++
 server/pom.xml                | 14 ++++++++++++
 service-rpc/pom.xml           | 20 ----------------
 session/pom.xml               | 47 ++++++++++++++++++++++----------------
 thrift/pom.xml                | 20 ----------------
 tsfile/pom.xml                | 47 ++++++++++++++++++++++----------------
 zeppelin-interpreter/pom.xml  | 49 +++++++++++++++++++++++----------------
 15 files changed, 247 insertions(+), 187 deletions(-)

diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml
index 033eb5b..6e53931 100644
--- a/.github/workflows/client.yml
+++ b/.github/workflows/client.yml
@@ -60,7 +60,7 @@ jobs:
           key: client-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
           restore-keys: ${{ runner.os }}-m2-
       - name: Test with Maven
-        run:  mvn -B clean integration-test -Pclient-cpp 
-Dtsfile.test.skip=true -Djdbc.test.skip=true -Diotdb.test.skip=true 
-Dtest.port.closed=true -Denforcer.skip=true -pl 
server,client-cpp,example/client-cpp-example -am
+        run:  mvn -B clean integration-test -Pclient-cpp 
-Dtsfile.test.skip=true -Djdbc.test.skip=true -Diotdb.test.skip=true 
-Dtest.port.closed=true -pl server,client-cpp,example/client-cpp-example -am
 
   build-win:
     strategy:
diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml
index 3c7250d..df1c9ed 100644
--- a/.github/workflows/main-ci.yml
+++ b/.github/workflows/main-ci.yml
@@ -26,6 +26,17 @@ jobs:
       matrix:
         java: [8, 11.0.x]
         os: [ubuntu-latest, macos-latest]
+        # to reduce the CI time cost; we split the whole CI to 3 parts:
+        # modules except the server and the cluster:
+        #   -Diotdb.skip.test=true -Dcluster.skip.test=true
+        # the server module:
+        #   -pl server -am -DskipTests=true -Diotdb.test.only=true
+        # the cluster module:
+        #   -pl cluster -am -DskipTests=true -Dcluster.test.only=true
+        it_task: ['-Diotdb.skip.test=true -Dcluster.skip.test=true',
+                  '-pl server -am -DskipTests=true -Diotdb.test.only=true',
+                  '-pl cluster -am -DskipTests=true -Dcluster.test.only=true'
+                ]
     runs-on: ${{ matrix.os}}
 
     steps:
@@ -43,7 +54,7 @@ jobs:
       - name: Check Apache Rat
         run: mvn -B apache-rat:check -P client-cpp
       - name: Test with Maven
-        run:  mvn -B clean integration-test -Dtest.port.closed=true 
-Denforcer.skip=true
+        run:  mvn -B clean integration-test -Dtest.port.closed=true ${{ 
matrix.it_task}}
 
   build-win:
     strategy:
@@ -109,4 +120,4 @@ jobs:
           restore-keys: ${{ runner.os }}-hadoop-files
       - name: Test with Maven
         shell: bash
-        run:  source ~/.bash_profile && mvn -B clean integration-test 
-Dtest.port.closed=true -Denforcer.skip=true
\ No newline at end of file
+        run:  source ~/.bash_profile && mvn -B clean integration-test 
-Dtest.port.closed=true ${{ matrix.it_task}}
\ No newline at end of file
diff --git a/Jenkinsfile b/Jenkinsfile
index f3b6886..c883763 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -85,7 +85,7 @@ pipeline {
                 sh 'mvn clean'
                 // We'll deploy to a relative directory so we can
                 // deploy new versions only if the entire build succeeds
-                sh 'mvn ${MVN_TEST_FAIL_IGNORE} 
-DaltDeploymentRepository=snapshot-repo::default::file:./local-snapshots-dir -P 
client-cpp clean deploy'
+                sh 'mvn ${MVN_TEST_FAIL_IGNORE} 
-DaltDeploymentRepository=snapshot-repo::default::file:./local-snapshots-dir -P 
client-cpp clean deploy -P get-jar-with-dependencies'
             }
             post {
                 always {
@@ -120,7 +120,7 @@ pipeline {
             steps {
                 echo 'Deploying'
                 // Deploy the artifacts using the wagon-maven-plugin.
-                sh 'mvn -f jenkins.pom -X -P deploy-snapshots -P client-cpp 
wagon:upload'
+                sh 'mvn -f jenkins.pom -X -P deploy-snapshots -P client-cpp 
wagon:upload -P get-jar-with-dependencies'
             }
         }
 
diff --git a/cluster/pom.xml b/cluster/pom.xml
index 6d257d1..1d29693 100644
--- a/cluster/pom.xml
+++ b/cluster/pom.xml
@@ -151,6 +151,20 @@
                 <cluster.ut.skip>true</cluster.ut.skip>
             </properties>
         </profile>
+        <profile>
+            <id>only_test_Cluster</id>
+            <activation>
+                <property>
+                    <name>cluster.test.only</name>
+                    <value>true</value>
+                </property>
+            </activation>
+            <properties>
+                <cluster.test.skip>false</cluster.test.skip>
+                <cluster.ut.skip>false</cluster.ut.skip>
+                <cluster.it.skip>false</cluster.it.skip>
+            </properties>
+        </profile>
     </profiles>
     <build>
         <plugins>
diff --git a/example/udf/pom.xml b/example/udf/pom.xml
index 5fc640e..d96b582 100644
--- a/example/udf/pom.xml
+++ b/example/udf/pom.xml
@@ -35,24 +35,6 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>3.1.0</version>
-                <configuration>
-                    <descriptorRefs>
-                        <descriptorRef>jar-with-dependencies</descriptorRef>
-                    </descriptorRefs>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <version>3.3</version>
@@ -79,4 +61,33 @@
             </plugin>
         </plugins>
     </build>
+    <profiles>
+        <profile>
+            <id>get-jar-with-dependencies</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <version>3.1.0</version>
+                        <configuration>
+                            <descriptorRefs>
+                                
<descriptorRef>jar-with-dependencies</descriptorRef>
+                            </descriptorRefs>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>make-assembly</id>
+                                <!-- this is used for inheritance merges -->
+                                <phase>package</phase>
+                                <!-- bind to the packaging phase -->
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 </project>
diff --git a/hadoop/pom.xml b/hadoop/pom.xml
index 6fd887a..776e377 100644
--- a/hadoop/pom.xml
+++ b/hadoop/pom.xml
@@ -125,26 +125,6 @@
                     <skipITs>${hadoop.it.skip}</skipITs>
                 </configuration>
             </plugin>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>${maven.assembly.version}</version>
-                <configuration>
-                    <descriptorRefs>
-                        <descriptorRef>jar-with-dependencies</descriptorRef>
-                    </descriptorRefs>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <!-- this is used for inheritance merges -->
-                        <phase>package</phase>
-                        <!-- bind to the packaging phase -->
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
     <profiles>
@@ -174,5 +154,32 @@
                 <hadoop.ut.skip>true</hadoop.ut.skip>
             </properties>
         </profile>
+        <profile>
+            <id>get-jar-with-dependencies</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <version>${maven.assembly.version}</version>
+                        <configuration>
+                            <descriptorRefs>
+                                
<descriptorRef>jar-with-dependencies</descriptorRef>
+                            </descriptorRefs>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>make-assembly</id>
+                                <!-- this is used for inheritance merges -->
+                                <phase>package</phase>
+                                <!-- bind to the packaging phase -->
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 </project>
diff --git a/hive-connector/pom.xml b/hive-connector/pom.xml
index c02b268..7a0355d 100644
--- a/hive-connector/pom.xml
+++ b/hive-connector/pom.xml
@@ -168,30 +168,6 @@
             </dependency>
         </dependencies>
     </dependencyManagement>
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>${maven.assembly.version}</version>
-                <configuration>
-                    <descriptorRefs>
-                        <descriptorRef>jar-with-dependencies</descriptorRef>
-                    </descriptorRefs>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <!-- this is used for inheritance merges -->
-                        <phase>package</phase>
-                        <!-- bind to the packaging phase -->
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
     <!-- org.pentaho:pentaho-aggdesigner-algorithm is in repo.spring.io and we 
have to claim
     to use https-->
     <!-- Please note the notice in 
https://spring.io/blog/2020/10/29/notice-of-permissions-changes-to-repo-spring-io-fall-and-winter-2020
@@ -212,4 +188,33 @@
             </snapshots>
         </repository>
     </repositories>
+    <profiles>
+        <profile>
+            <id>get-jar-with-dependencies</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <version>${maven.assembly.version}</version>
+                        <configuration>
+                            <descriptorRefs>
+                                
<descriptorRef>jar-with-dependencies</descriptorRef>
+                            </descriptorRefs>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>make-assembly</id>
+                                <!-- this is used for inheritance merges -->
+                                <phase>package</phase>
+                                <!-- bind to the packaging phase -->
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 </project>
diff --git a/jdbc/pom.xml b/jdbc/pom.xml
index aeec890..41e1ffd 100644
--- a/jdbc/pom.xml
+++ b/jdbc/pom.xml
@@ -146,26 +146,6 @@
                     </archive>
                 </configuration>
             </plugin>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>${maven.assembly.version}</version>
-                <configuration>
-                    <descriptorRefs>
-                        <descriptorRef>jar-with-dependencies</descriptorRef>
-                    </descriptorRefs>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <!-- this is used for inheritance merges -->
-                        <phase>package</phase>
-                        <!-- bind to the packaging phase -->
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
             <!--using `mvn test` to run UT, `mvn verify` to run ITs
       Reference: 
https://antoniogoncalves.org/2012/12/13/lets-turn-integration-tests-with-maven-to-a-first-class-citizen/-->
             <plugin>
@@ -260,5 +240,32 @@
                 <jdbc.ut.skip>true</jdbc.ut.skip>
             </properties>
         </profile>
+        <profile>
+            <id>get-jar-with-dependencies</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <version>${maven.assembly.version}</version>
+                        <configuration>
+                            <descriptorRefs>
+                                
<descriptorRef>jar-with-dependencies</descriptorRef>
+                            </descriptorRefs>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>make-assembly</id>
+                                <!-- this is used for inheritance merges -->
+                                <phase>package</phase>
+                                <!-- bind to the packaging phase -->
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 </project>
diff --git a/pom.xml b/pom.xml
index edfe2a8..a01e902 100644
--- a/pom.xml
+++ b/pom.xml
@@ -146,6 +146,8 @@
         <argLine/>
         <!-- whether enable compiling the cpp client-->
         <client-cpp>false</client-cpp>
+        <!-- disable enforcer by default-->
+        <enforcer.skip>true</enforcer.skip>
     </properties>
     <!--
         if we claim dependencies in dependencyManagement, then we do not claim
@@ -1283,5 +1285,11 @@
                 <module>client-cpp</module>
             </modules>
         </profile>
+        <profile>
+            <id>enforce</id>
+            <properties>
+                <enforcer.skip>false</enforcer.skip>
+            </properties>
+        </profile>
     </profiles>
 </project>
diff --git a/server/pom.xml b/server/pom.xml
index 2591bec..d1ce0ef 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -297,5 +297,19 @@
                 <iotdb.ut.skip>true</iotdb.ut.skip>
             </properties>
         </profile>
+        <profile>
+            <id>only_test_server</id>
+            <activation>
+                <property>
+                    <name>iotdb.test.only</name>
+                    <value>true</value>
+                </property>
+            </activation>
+            <properties>
+                <iotdb.test.skip>false</iotdb.test.skip>
+                <iotdb.ut.skip>false</iotdb.ut.skip>
+                <iotdb.it.skip>false</iotdb.it.skip>
+            </properties>
+        </profile>
     </profiles>
 </project>
diff --git a/service-rpc/pom.xml b/service-rpc/pom.xml
index f692814..83995c8 100644
--- a/service-rpc/pom.xml
+++ b/service-rpc/pom.xml
@@ -85,26 +85,6 @@
                     </archive>
                 </configuration>
             </plugin>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>${maven.assembly.version}</version>
-                <configuration>
-                    <descriptorRefs>
-                        <descriptorRef>jar-with-dependencies</descriptorRef>
-                    </descriptorRefs>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <!-- this is used for inheritance merges -->
-                        <phase>package</phase>
-                        <!-- bind to the packaging phase -->
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
             <!--using `mvn test` to run UT, `mvn verify` to run ITs
             Reference: 
https://antoniogoncalves.org/2012/12/13/lets-turn-integration-tests-with-maven-to-a-first-class-citizen/-->
             <plugin>
diff --git a/session/pom.xml b/session/pom.xml
index 4276223..4c68333 100644
--- a/session/pom.xml
+++ b/session/pom.xml
@@ -36,26 +36,6 @@
     </properties>
     <build>
         <plugins>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>${maven.assembly.version}</version>
-                <configuration>
-                    <descriptorRefs>
-                        <descriptorRef>jar-with-dependencies</descriptorRef>
-                    </descriptorRefs>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <!-- this is used for inheritance merges -->
-                        <phase>package</phase>
-                        <!-- bind to the packaging phase -->
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
             <!--using `mvn test` to run UT, `mvn verify` to run ITs
       Reference: 
https://antoniogoncalves.org/2012/12/13/lets-turn-integration-tests-with-maven-to-a-first-class-citizen/-->
             <plugin>
@@ -147,5 +127,32 @@
                 <session.ut.skip>true</session.ut.skip>
             </properties>
         </profile>
+        <profile>
+            <id>get-jar-with-dependencies</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <version>${maven.assembly.version}</version>
+                        <configuration>
+                            <descriptorRefs>
+                                
<descriptorRef>jar-with-dependencies</descriptorRef>
+                            </descriptorRefs>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>make-assembly</id>
+                                <!-- this is used for inheritance merges -->
+                                <phase>package</phase>
+                                <!-- bind to the packaging phase -->
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 </project>
diff --git a/thrift/pom.xml b/thrift/pom.xml
index 8ee3873..989bf85 100644
--- a/thrift/pom.xml
+++ b/thrift/pom.xml
@@ -74,26 +74,6 @@
                     </archive>
                 </configuration>
             </plugin>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>${maven.assembly.version}</version>
-                <configuration>
-                    <descriptorRefs>
-                        <descriptorRef>jar-with-dependencies</descriptorRef>
-                    </descriptorRefs>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <!-- this is used for inheritance merges -->
-                        <phase>package</phase>
-                        <!-- bind to the packaging phase -->
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
 </project>
diff --git a/tsfile/pom.xml b/tsfile/pom.xml
index e05e38a..b5e1370 100644
--- a/tsfile/pom.xml
+++ b/tsfile/pom.xml
@@ -97,26 +97,6 @@
                     </archive>
                 </configuration>
             </plugin>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>${maven.assembly.version}</version>
-                <configuration>
-                    <descriptorRefs>
-                        <descriptorRef>jar-with-dependencies</descriptorRef>
-                    </descriptorRefs>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <!-- this is used for inheritance merges -->
-                        <phase>package</phase>
-                        <!-- bind to the packaging phase -->
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
             <!--using `mvn test` to run UT, `mvn verify` to run ITs
             Reference: 
https://antoniogoncalves.org/2012/12/13/lets-turn-integration-tests-with-maven-to-a-first-class-citizen/-->
             <plugin>
@@ -173,5 +153,32 @@
                 <tsfile.ut.skip>true</tsfile.ut.skip>
             </properties>
         </profile>
+        <profile>
+            <id>get-jar-with-dependencies</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <version>${maven.assembly.version}</version>
+                        <configuration>
+                            <descriptorRefs>
+                                
<descriptorRef>jar-with-dependencies</descriptorRef>
+                            </descriptorRefs>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>make-assembly</id>
+                                <!-- this is used for inheritance merges -->
+                                <phase>package</phase>
+                                <!-- bind to the packaging phase -->
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 </project>
diff --git a/zeppelin-interpreter/pom.xml b/zeppelin-interpreter/pom.xml
index 0376060..fd7a718 100644
--- a/zeppelin-interpreter/pom.xml
+++ b/zeppelin-interpreter/pom.xml
@@ -117,26 +117,35 @@
                     <target>1.8</target>
                 </configuration>
             </plugin>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>${maven.assembly.version}</version>
-                <configuration>
-                    <descriptorRefs>
-                        <descriptorRef>jar-with-dependencies</descriptorRef>
-                    </descriptorRefs>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <!-- this is used for inheritance merges -->
-                        <phase>package</phase>
-                        <!-- bind to the packaging phase -->
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
+    <profiles>
+        <profile>
+            <id>get-jar-with-dependencies</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <version>${maven.assembly.version}</version>
+                        <configuration>
+                            <descriptorRefs>
+                                
<descriptorRef>jar-with-dependencies</descriptorRef>
+                            </descriptorRefs>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>make-assembly</id>
+                                <!-- this is used for inheritance merges -->
+                                <phase>package</phase>
+                                <!-- bind to the packaging phase -->
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 </project>

Reply via email to