]> source.dussan.org Git - archiva.git/commitdiff
add gh action, dependabot and release-drafter and get rid of travis (#65)
authorOlivier Lamy <olamy@apache.org>
Mon, 11 Apr 2022 04:11:45 +0000 (14:11 +1000)
committerGitHub <noreply@github.com>
Mon, 11 Apr 2022 04:11:45 +0000 (14:11 +1000)
* add gh action, dependabot and release-drafter and get rid of travis
* move owasp check in a separate profile

Signed-off-by: Olivier Lamy <olamy@apache.org>
.github/dependabot.yml
.github/release-drafter.yml
.github/workflows/maven.yml [new file with mode: 0644]
.github/workflows/release-drafter.yml
.travis.yml [deleted file]
Jenkinsfile
archiva-modules/archiva-web/archiva-webapp/pom.xml
pom.xml

index 2057a6a06ac75545ac38ee98c5ff840e9b1000d6..b6de61b8f74a32c5b1e308b5ea9180aef8f95cea 100644 (file)
@@ -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"
+
index aad5e119cdb704aa5a91cedcfb1e4d9ffb64b5e8..356a9b58465f2fca33bd9b20b0a0d89c04fe9605 100644 (file)
@@ -16,3 +16,4 @@
 # under the License.
 
 _extends: archiva-parent
+tag-template: archiva-$NEXT_MINOR_VERSION
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
new file mode 100644 (file)
index 0000000..f7cccf5
--- /dev/null
@@ -0,0 +1,48 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: GitHub CI
+
+on:
+  push:
+  pull_request:
+
+
+jobs:
+  build:
+
+    strategy:
+      matrix:
+        os: [ubuntu-latest]
+        java: [8, 11]
+      fail-fast: false
+
+    runs-on: ${{ matrix.os }}
+
+    steps:
+      - 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
index 05e5391574dbf7df86a6ee7e4a5970d9fafec4c1..bb5c0f3887e581eefa0a1c27f89dadbbc92a680d 100644 (file)
 # 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 (file)
index a6e6ec9..0000000
+++ /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
-
index c15f75642157a4c0c938f6501f62e482d82216dd..eaebba1bdb1511a02a408c9f25599a7b6be11ab4 100644 (file)
@@ -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}"
                                         }
                             }
                         }
index 1418bec90a9c59dd35a65032826615e8436834ec..d3ca9044172f9efffcc097a55e84052234704290 100644 (file)
           </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>
 
         <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 ffcd4be772f97720203ec9ce73be9b0d9cf921f8..e3cbef7b4f632ccb6b0978f4279032d0672fb86a 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <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>
         <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>