Update parent and add actions.

This commit is contained in:
Stephan Schnabel 2020-11-13 09:39:58 +01:00
parent 776cbf6cdf
commit ed16096bd6
5 changed files with 96 additions and 7 deletions

18
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,18 @@
name: PullRequest
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup
uses: actions/setup-java@v1
with:
java-version: 11
- name: dependencies
run: mvn -B -q dependency:go-offline
- name: verify
run: mvn -B verify

37
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,37 @@
name: Release
on:
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.GIT_ACTION_TOKEN }}
- name: git-configure
run: |
git config user.email "actions@github.com"
git config user.name "GitHub Actions"
- name: setup
uses: actions/setup-java@v1
with:
java-version: 11
server-id: sonatype-nexus
server-username: SERVER_USERNAME
server-password: SERVER_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: dependencies
run: mvn -B -q dependency:go-offline
- name: prepare
run: mvn -B release:prepare
- name: perform
run: mvn -B release:perform
env:
SERVER_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
SERVER_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

28
.github/workflows/snapshot.yml vendored Normal file
View file

@ -0,0 +1,28 @@
name: Snapshot
on:
push:
branches:
- 'main'
- '[1-9]+.[0-9]+.x'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup
uses: actions/setup-java@v1
with:
java-version: 11
server-id: sonatype-nexus
server-username: SERVER_USERNAME
server-password: SERVER_PASSWORD
- name: dependencies
run: mvn -B -q dependency:go-offline
- name: deploy
run: mvn -B deploy
env:
SERVER_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
SERVER_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}

View file

@ -2,9 +2,8 @@
## Features ## Features
### Preconfigured Appender ### Available Appender
Buildin appender:
* console format * console format
* Stackdriver format (with support for error reporting) * Stackdriver format (with support for error reporting)
@ -94,9 +93,9 @@ logger:
header: ${logger.request.header.header-name} header: ${logger.request.header.header-name}
``` ```
### Add princial for request to MDC ### Add principal for request to MDC
Confguration: Configuration:
* *enabled*: enable HTTP principal filter (`true` is default) * *enabled*: enable HTTP principal filter (`true` is default)
* *order*: order for [Ordered](https://github.com/micronaut-projects/micronaut-core/blob/master/core/src/main/java/io/micronaut/core/order/Ordered.java) ([ServerFilterPhase.SECURITY.after()](https://github.com/micronaut-projects/micronaut-core/blob/v2.0.1/http/src/main/java/io/micronaut/http/filter/ServerFilterPhase.java#L54) is default) * *order*: order for [Ordered](https://github.com/micronaut-projects/micronaut-core/blob/master/core/src/main/java/io/micronaut/core/order/Ordered.java) ([ServerFilterPhase.SECURITY.after()](https://github.com/micronaut-projects/micronaut-core/blob/v2.0.1/http/src/main/java/io/micronaut/http/filter/ServerFilterPhase.java#L54) is default)
* *path*: filter path (`/**` is default) * *path*: filter path (`/**` is default)

13
pom.xml
View file

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>io.kokuwa</groupId> <groupId>io.kokuwa</groupId>
<artifactId>maven-parent</artifactId> <artifactId>maven-parent</artifactId>
<version>0.2.0</version> <version>0.2.3</version>
<relativePath /> <relativePath />
</parent> </parent>
@ -13,8 +13,8 @@
<artifactId>micronaut-logging</artifactId> <artifactId>micronaut-logging</artifactId>
<version>0.0.4-SNAPSHOT</version> <version>0.0.4-SNAPSHOT</version>
<name>Micronaut Logging Support</name> <name>Logging support for Micronaut</name>
<description>TODO</description> <description>Endhanced logging using MDC or request header.</description>
<url>https://github.com/kokuwaio/micronaut-logging</url> <url>https://github.com/kokuwaio/micronaut-logging</url>
<inceptionYear>2020</inceptionYear> <inceptionYear>2020</inceptionYear>
<licenses> <licenses>
@ -24,6 +24,13 @@
</license> </license>
</licenses> </licenses>
<developers>
<developer>
<name>Stephan Schnabel</name>
<url>https://github.com/stephanschnabel</url>
</developer>
</developers>
<scm> <scm>
<url>https://github.com/kokuwaio/micronaut-logging</url> <url>https://github.com/kokuwaio/micronaut-logging</url>
<connection>scm:git:https://github.com/kokuwaio/micronaut-logging.git</connection> <connection>scm:git:https://github.com/kokuwaio/micronaut-logging.git</connection>