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 <olamy@apache.org>
This commit is contained in:
Olivier Lamy 2022-04-11 14:11:45 +10:00 committed by GitHub
parent eb489a1dee
commit 6f4b08e4ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 109 additions and 66 deletions

View File

@ -31,5 +31,13 @@ updates:
- package-ecosystem: "github-actions" - package-ecosystem: "github-actions"
directory: "/" directory: "/"
target-branch: "archiva-2.x"
schedule: schedule:
interval: "daily" interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "master"
schedule:
interval: "daily"

View File

@ -16,3 +16,4 @@
# under the License. # under the License.
_extends: archiva-parent _extends: archiva-parent
tag-template: archiva-$NEXT_MINOR_VERSION

48
.github/workflows/maven.yml vendored Normal file
View File

@ -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

View File

@ -14,16 +14,16 @@
# KIND, either express or implied. See the License for the # KIND, either express or implied. See the License for the
# specific language governing permissions and limitations # specific language governing permissions and limitations
# under the License. # under the License.
name: Release Drafter name: Release Drafter
on: on:
push: push:
branches: branches:
- master - master
- archiva-2.x
jobs: jobs:
update_release_draft: update_release_draft:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: release-drafter/release-drafter@v5.18.1 - uses: release-drafter/release-drafter@v5
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -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

2
Jenkinsfile vendored
View File

@ -149,7 +149,7 @@ pipeline {
{ {
sh "chmod 755 ./src/ci/scripts/prepareWorkspace.sh" sh "chmod 755 ./src/ci/scripts/prepareWorkspace.sh"
sh "./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}"
} }
} }
} }

View File

@ -840,10 +840,20 @@
</systemPropertyVariables> </systemPropertyVariables>
</configuration> </configuration>
</plugin> </plugin>
</plugins>
</build>
<profiles>
<profile>
<id>cassandra</id>
<properties>
<archiva.repositorySessionFactory.id>cassandra</archiva.repositorySessionFactory.id>
</properties>
</profile>
<profile>
<id>owasp</id>
<build>
<plugins>
<plugin> <plugin>
<groupId>org.owasp</groupId> <groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId> <artifactId>dependency-check-maven</artifactId>
@ -866,13 +876,6 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<profiles>
<profile>
<id>cassandra</id>
<properties>
<archiva.repositorySessionFactory.id>cassandra</archiva.repositorySessionFactory.id>
</properties>
</profile> </profile>
</profiles> </profiles>

44
pom.xml
View File

@ -2179,17 +2179,17 @@
<enabled>true</enabled> <enabled>true</enabled>
</snapshots> </snapshots>
</repository> </repository>
<repository> <!-- <repository>-->
<id>jetty.snapshots</id> <!-- <id>jetty.snapshots</id>-->
<name>Jetty Snapshots</name> <!-- <name>Jetty Snapshots</name>-->
<url>https://oss.sonatype.org/content/repositories/jetty-snapshots/</url> <!-- <url>https://oss.sonatype.org/content/repositories/jetty-snapshots/</url>-->
<releases> <!-- <releases>-->
<enabled>false</enabled> <!-- <enabled>false</enabled>-->
</releases> <!-- </releases>-->
<snapshots> <!-- <snapshots>-->
<enabled>true</enabled> <!-- <enabled>true</enabled>-->
</snapshots> <!-- </snapshots>-->
</repository> <!-- </repository>-->
</repositories> </repositories>
<pluginRepositories> <pluginRepositories>
<pluginRepository> <pluginRepository>
@ -2203,16 +2203,16 @@
<enabled>true</enabled> <enabled>true</enabled>
</snapshots> </snapshots>
</pluginRepository> </pluginRepository>
<pluginRepository> <!-- <pluginRepository>-->
<id>jetty.snapshots</id> <!-- <id>jetty.snapshots</id>-->
<name>Jetty Snapshots</name> <!-- <name>Jetty Snapshots</name>-->
<url>https://oss.sonatype.org/content/repositories/jetty-snapshots/</url> <!-- <url>https://oss.sonatype.org/content/repositories/jetty-snapshots/</url>-->
<releases> <!-- <releases>-->
<enabled>false</enabled> <!-- <enabled>false</enabled>-->
</releases> <!-- </releases>-->
<snapshots> <!-- <snapshots>-->
<enabled>true</enabled> <!-- <enabled>true</enabled>-->
</snapshots> <!-- </snapshots>-->
</pluginRepository> <!-- </pluginRepository>-->
</pluginRepositories> </pluginRepositories>
</project> </project>