You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2022/04/11 04:11:50 UTC

[archiva] branch master updated: add gh action, dependabot and release-drafter and get rid of travis (#65)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 6f4b08e4a add gh action, dependabot and release-drafter and get rid of travis (#65)
6f4b08e4a is described below

commit 6f4b08e4ad279dcf77faa8034f3e3983e3afde32
Author: Olivier Lamy <ol...@apache.org>
AuthorDate: Mon Apr 11 14:11:45 2022 +1000

    add gh action, dependabot and release-drafter and get rid of travis (#65)
    
    * add gh action, dependabot and release-drafter and get rid of travis
    * move owasp check in a separate profile
    
    Signed-off-by: Olivier Lamy <ol...@apache.org>
---
 .github/dependabot.yml                             |  8 ++++
 .github/release-drafter.yml                        |  1 +
 .../workflows/{release-drafter.yml => maven.yml}   | 37 ++++++++++++----
 .github/workflows/release-drafter.yml              |  4 +-
 .travis.yml                                        | 17 --------
 Jenkinsfile                                        |  2 +-
 archiva-modules/archiva-web/archiva-webapp/pom.xml | 51 ++++++++++++----------
 pom.xml                                            | 44 +++++++++----------
 8 files changed, 89 insertions(+), 75 deletions(-)

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 2057a6a06..b6de61b8f 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -31,5 +31,13 @@ updates:
 
   - package-ecosystem: "github-actions"
     directory: "/"
+    target-branch: "archiva-2.x"
+    schedule:
+      interval: "daily"
+
+  - package-ecosystem: "github-actions"
+    directory: "/"
+    target-branch: "master"
     schedule:
       interval: "daily"
+
diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml
index aad5e119c..356a9b584 100644
--- a/.github/release-drafter.yml
+++ b/.github/release-drafter.yml
@@ -16,3 +16,4 @@
 # under the License.
 
 _extends: archiva-parent
+tag-template: archiva-$NEXT_MINOR_VERSION
diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/maven.yml
similarity index 62%
copy from .github/workflows/release-drafter.yml
copy to .github/workflows/maven.yml
index 05e539157..f7cccf536 100644
--- a/.github/workflows/release-drafter.yml
+++ b/.github/workflows/maven.yml
@@ -14,16 +14,35 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-   
-name: Release Drafter
+
+name: GitHub CI
+
 on:
   push:
-    branches:
-      - master
+  pull_request:
+
+
 jobs:
-  update_release_draft:
-    runs-on: ubuntu-latest
+  build:
+
+    strategy:
+      matrix:
+        os: [ubuntu-latest]
+        java: [8, 11]
+      fail-fast: false
+
+    runs-on: ${{ matrix.os }}
+
     steps:
-      - uses: release-drafter/release-drafter@v5.18.1
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      - name: Checkout
+        uses: actions/checkout@v2
+
+      - name: Set up JDK
+        uses: actions/setup-java@v2.3.1
+        with:
+          distribution: temurin
+          java-version: ${{ matrix.java }}
+          cache: 'maven'
+
+      - name: Build with Maven
+        run: mvn -e -B -V install -Pci-build -T2
diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml
index 05e539157..bb5c0f388 100644
--- a/.github/workflows/release-drafter.yml
+++ b/.github/workflows/release-drafter.yml
@@ -14,16 +14,16 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-   
 name: Release Drafter
 on:
   push:
     branches:
       - master
+      - archiva-2.x
 jobs:
   update_release_draft:
     runs-on: ubuntu-latest
     steps:
-      - uses: release-drafter/release-drafter@v5.18.1
+      - uses: release-drafter/release-drafter@v5
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index a6e6ec9a2..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-language: java
-dist: xenial
-jdk:
-  - openjdk8
-
-install: "mvn clean install -DskipTests=true -B -V -Pci-build"
-
-script: "mvn clean install -B -V -Pci-build"
-
-cache:
-    directories:
-    - $HOME/.m2
-
-branches:
-    except:
-        - gh-pages
-
diff --git a/Jenkinsfile b/Jenkinsfile
index c15f75642..eaebba1bd 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -149,7 +149,7 @@ pipeline {
                                         {
                                             sh "chmod 755 ./src/ci/scripts/prepareWorkspace.sh"
                                             sh "./src/ci/scripts/prepareWorkspace.sh"
-                                            sh "mvn clean install -U -B -e -fae -Dorg.slf4j.simpleLogger.showThreadName=true -Dmaven.compiler.fork=true -Pci-build -T${THREADS}"
+                                            sh "mvn clean install -U -B -e -fae -Dorg.slf4j.simpleLogger.showThreadName=true -Pci-build -T${THREADS}"
                                         }
                             }
                         }
diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml
index 1418bec90..d3ca90441 100644
--- a/archiva-modules/archiva-web/archiva-webapp/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml
@@ -840,30 +840,6 @@
           </systemPropertyVariables>
         </configuration>
       </plugin>
-
-
-
-
-      <plugin>
-        <groupId>org.owasp</groupId>
-        <artifactId>dependency-check-maven</artifactId>
-        <version>6.0.4</version>
-        <configuration>
-          <skipProvidedScope>true</skipProvidedScope>
-          <failBuildOnCVSS>8</failBuildOnCVSS>
-          <suppressionFile>${project.basedir}/src/main/resources/META-INF/owasp/cve-suppressions.xml</suppressionFile>
-          <ossindexAnalyzerEnabled>false</ossindexAnalyzerEnabled>
-          <assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
-          <nodeAnalyzerEnabled>false</nodeAnalyzerEnabled>
-        </configuration>
-        <executions>
-          <execution>
-            <goals>
-              <goal>check</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
     </plugins>
   </build>
 
@@ -874,6 +850,33 @@
         <archiva.repositorySessionFactory.id>cassandra</archiva.repositorySessionFactory.id>
       </properties>
     </profile>
+    <profile>
+      <id>owasp</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.owasp</groupId>
+            <artifactId>dependency-check-maven</artifactId>
+            <version>6.0.4</version>
+            <configuration>
+              <skipProvidedScope>true</skipProvidedScope>
+              <failBuildOnCVSS>8</failBuildOnCVSS>
+              <suppressionFile>${project.basedir}/src/main/resources/META-INF/owasp/cve-suppressions.xml</suppressionFile>
+              <ossindexAnalyzerEnabled>false</ossindexAnalyzerEnabled>
+              <assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
+              <nodeAnalyzerEnabled>false</nodeAnalyzerEnabled>
+            </configuration>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>check</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
   </profiles>
 
 </project>
diff --git a/pom.xml b/pom.xml
index ffcd4be77..e3cbef7b4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2179,17 +2179,17 @@
         <enabled>true</enabled>
       </snapshots>
     </repository>
-    <repository>
-      <id>jetty.snapshots</id>
-      <name>Jetty Snapshots</name>
-      <url>https://oss.sonatype.org/content/repositories/jetty-snapshots/</url>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </repository>
+<!--    <repository>-->
+<!--      <id>jetty.snapshots</id>-->
+<!--      <name>Jetty Snapshots</name>-->
+<!--      <url>https://oss.sonatype.org/content/repositories/jetty-snapshots/</url>-->
+<!--      <releases>-->
+<!--        <enabled>false</enabled>-->
+<!--      </releases>-->
+<!--      <snapshots>-->
+<!--        <enabled>true</enabled>-->
+<!--      </snapshots>-->
+<!--    </repository>-->
   </repositories>
   <pluginRepositories>
     <pluginRepository>
@@ -2203,16 +2203,16 @@
         <enabled>true</enabled>
       </snapshots>
     </pluginRepository>
-    <pluginRepository>
-      <id>jetty.snapshots</id>
-      <name>Jetty Snapshots</name>
-      <url>https://oss.sonatype.org/content/repositories/jetty-snapshots/</url>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </pluginRepository>
+<!--    <pluginRepository>-->
+<!--      <id>jetty.snapshots</id>-->
+<!--      <name>Jetty Snapshots</name>-->
+<!--      <url>https://oss.sonatype.org/content/repositories/jetty-snapshots/</url>-->
+<!--      <releases>-->
+<!--        <enabled>false</enabled>-->
+<!--      </releases>-->
+<!--      <snapshots>-->
+<!--        <enabled>true</enabled>-->
+<!--      </snapshots>-->
+<!--    </pluginRepository>-->
   </pluginRepositories>
 </project>