You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2020/09/02 09:40:28 UTC

[karaf] branch master updated: Fix test phase execution on Jenkins

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

jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/master by this push:
     new 009082c  Fix test phase execution on Jenkins
     new a169ee2  Merge pull request #1175 from jbonofre/VERIFY_REGION
009082c is described below

commit 009082cd35f6c13070f22c59563bd8aed35cc95e
Author: jbonofre <jb...@apache.org>
AuthorDate: Wed Sep 2 08:47:25 2020 +0200

    Fix test phase execution on Jenkins
---
 Jenkinsfile                                        | 12 ++++----
 assemblies/apache-karaf-minimal/pom.xml            | 24 +++++++++++++++
 assemblies/apache-karaf/pom.xml                    | 21 +++++++++++++
 assemblies/features/enterprise/pom.xml             | 20 +++++++++++++
 assemblies/features/spring-legacy/pom.xml          | 20 +++++++++++++
 assemblies/features/spring/pom.xml                 | 20 +++++++++++++
 assemblies/features/standard/pom.xml               | 20 +++++++++++++
 assemblies/features/static/pom.xml                 | 34 ++++++++++++++++++++++
 .../karaf-docker-example-dynamic-dist/pom.xml      | 25 ++++++++++++++++
 .../karaf-docker-example-static-dist/pom.xml       | 25 ++++++++++++++++
 .../karaf-profile-example-dynamic/pom.xml          | 25 +++++++++++++++-
 .../karaf-profile-example-static/pom.xml           | 25 +++++++++++++++-
 12 files changed, 263 insertions(+), 8 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index fc012b0..ef7eee1 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -41,7 +41,7 @@ pipeline {
 
     options {
         // Configure an overall timeout for the build of one hour.
-        timeout(time: 1, unit: 'HOURS')
+        timeout(time: 3, unit: 'HOURS')
         // When we have test-fails e.g. we don't need to run the remaining steps
         skipStagesAfterUnstable()
         buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5'))
@@ -50,8 +50,8 @@ pipeline {
     stages {
         stage('Initialization') {
             steps {
-                echo 'Building Branch: ' + env.BRANCH_NAME
-                echo 'Using PATH = ' + env.PATH
+                echo 'Building branch ' + env.BRANCH_NAME
+                echo 'Using PATH ' + env.PATH
             }
         }
 
@@ -72,14 +72,14 @@ pipeline {
         stage('Build') {
             steps {
                 echo 'Building'
-                sh 'mvn -U -B -e clean install -DskipTests -Prat'
+                sh 'mvn -U -B -e clean install -DskipTests -Dinvoker.skip=true -Prat'
             }
         }
 
         stage('Tests') {
             steps {
                 echo 'Running tests'
-                sh 'mvn test'
+                sh 'mvn -B -e test -Ptest'
             }
             post {
                 always {
@@ -97,7 +97,7 @@ pipeline {
             }
             steps {
                 echo 'Deploying'
-                sh 'mvn deploy -Pdeploy'
+                sh 'mvn -B -e deploy -Pdeploy'
             }
         }
     }
diff --git a/assemblies/apache-karaf-minimal/pom.xml b/assemblies/apache-karaf-minimal/pom.xml
index de94723..b3cbcce 100644
--- a/assemblies/apache-karaf-minimal/pom.xml
+++ b/assemblies/apache-karaf-minimal/pom.xml
@@ -157,4 +157,28 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>process-resources</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>package</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/assemblies/apache-karaf/pom.xml b/assemblies/apache-karaf/pom.xml
index 1ed49d0..3ab951a 100644
--- a/assemblies/apache-karaf/pom.xml
+++ b/assemblies/apache-karaf/pom.xml
@@ -249,6 +249,27 @@
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>install-kar</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>package</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 
 </project>
diff --git a/assemblies/features/enterprise/pom.xml b/assemblies/features/enterprise/pom.xml
index 2832896..1b017ba 100644
--- a/assemblies/features/enterprise/pom.xml
+++ b/assemblies/features/enterprise/pom.xml
@@ -261,4 +261,24 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>verify</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/assemblies/features/spring-legacy/pom.xml b/assemblies/features/spring-legacy/pom.xml
index 16c50a7..b6b75dd 100644
--- a/assemblies/features/spring-legacy/pom.xml
+++ b/assemblies/features/spring-legacy/pom.xml
@@ -179,4 +179,24 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>verify</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/assemblies/features/spring/pom.xml b/assemblies/features/spring/pom.xml
index 11d7db2..236706b 100644
--- a/assemblies/features/spring/pom.xml
+++ b/assemblies/features/spring/pom.xml
@@ -179,4 +179,24 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>verify</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/assemblies/features/standard/pom.xml b/assemblies/features/standard/pom.xml
index a9dc5a1..7d42441 100644
--- a/assemblies/features/standard/pom.xml
+++ b/assemblies/features/standard/pom.xml
@@ -476,4 +476,24 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>verify</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/assemblies/features/static/pom.xml b/assemblies/features/static/pom.xml
index adefef5..45979a2 100644
--- a/assemblies/features/static/pom.xml
+++ b/assemblies/features/static/pom.xml
@@ -186,4 +186,38 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>package</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-dependency-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>unpack</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>copy</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/examples/karaf-docker-example/karaf-docker-example-dynamic-dist/pom.xml b/examples/karaf-docker-example/karaf-docker-example-dynamic-dist/pom.xml
index aed7aad..20c1c44 100644
--- a/examples/karaf-docker-example/karaf-docker-example-dynamic-dist/pom.xml
+++ b/examples/karaf-docker-example/karaf-docker-example-dynamic-dist/pom.xml
@@ -155,6 +155,31 @@
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>process-resources</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>package</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>dockerfile</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 
 </project>
\ No newline at end of file
diff --git a/examples/karaf-docker-example/karaf-docker-example-static-dist/pom.xml b/examples/karaf-docker-example/karaf-docker-example-static-dist/pom.xml
index e43420f..f7d839b 100644
--- a/examples/karaf-docker-example/karaf-docker-example-static-dist/pom.xml
+++ b/examples/karaf-docker-example/karaf-docker-example-static-dist/pom.xml
@@ -124,6 +124,31 @@
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>process-resources</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>package</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>dockerfile</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 
 </project>
diff --git a/examples/karaf-profile-example/karaf-profile-example-dynamic/pom.xml b/examples/karaf-profile-example/karaf-profile-example-dynamic/pom.xml
index 7079527..6f2bc71 100644
--- a/examples/karaf-profile-example/karaf-profile-example-dynamic/pom.xml
+++ b/examples/karaf-profile-example/karaf-profile-example-dynamic/pom.xml
@@ -122,8 +122,31 @@
                     </bootProfiles>
                 </configuration>
             </plugin>
-
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>process-resources</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>package</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/examples/karaf-profile-example/karaf-profile-example-static/pom.xml b/examples/karaf-profile-example/karaf-profile-example-static/pom.xml
index f87ced1..4437006 100644
--- a/examples/karaf-profile-example/karaf-profile-example-static/pom.xml
+++ b/examples/karaf-profile-example/karaf-profile-example-static/pom.xml
@@ -137,8 +137,31 @@
                     </blacklistedFeatures>
                 </configuration>
             </plugin>
-
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.karaf.tooling</groupId>
+                        <artifactId>karaf-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>process-resources</id>
+                                <phase>none</phase>
+                            </execution>
+                            <execution>
+                                <id>package</id>
+                                <phase>none</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>