Reconfigure for forgejo/woodpecker
This commit is contained in:
parent
9552221cc4
commit
a10691adb2
15 changed files with 249 additions and 253 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -1,2 +0,0 @@
|
|||
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
|
||||
* @sschnabe @rpahli @fabian-schlegel @jschwarze @wistefan @monotek
|
14
.github/dependabot.yml
vendored
14
.github/dependabot.yml
vendored
|
@ -1,14 +0,0 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: maven
|
||||
directory: /
|
||||
schedule:
|
||||
interval: daily
|
||||
allow:
|
||||
- dependency-name: io.kokuwa.maven:maven-parent
|
||||
- dependency-name: org.keycloak:keycloak-quarkus-server
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: monthly
|
||||
day: monday
|
16
.github/settings.xml
vendored
16
.github/settings.xml
vendored
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- https://github.com/actions/setup-java/issues/85 -->
|
||||
<settings>
|
||||
<servers>
|
||||
<server>
|
||||
<id>sonatype-nexus</id>
|
||||
<username>${env.SERVER_USERNAME}</username>
|
||||
<password>${env.SERVER_PASSWORD}</password>
|
||||
</server>
|
||||
<server>
|
||||
<id>github.com</id>
|
||||
<username>nope</username>
|
||||
<password>${env.GIT_ACTION_TOKEN}</password>
|
||||
</server>
|
||||
</servers>
|
||||
</settings>
|
50
.github/workflows/build.yaml
vendored
50
.github/workflows/build.yaml
vendored
|
@ -1,50 +0,0 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
MAVEN_ARGS: --batch-mode --color=always --no-transfer-progress --settings=.github/settings.xml
|
||||
steps:
|
||||
- name: docker/login-action docker.io
|
||||
uses: docker/login-action@v3.4.0
|
||||
with:
|
||||
registry: docker.io
|
||||
username: ${{ secrets.DOCKERIO_USERNAME }}
|
||||
password: ${{ secrets.DOCKERIO_TOKEN }}
|
||||
- name: docker/login-action ghcr.io
|
||||
uses: docker/login-action@v3.4.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GIT_ACTION_TOKEN }}
|
||||
- run: git config --global user.name "${{ vars.KOKUWA_IO_BOT_NAME }}"
|
||||
- run: git config --global user.email "${{ vars.KOKUWA_IO_BOT_EMAIL }}"
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GIT_ACTION_TOKEN }}
|
||||
- uses: crazy-max/ghaction-import-gpg@v6
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
git_user_signingkey: true
|
||||
git_commit_gpgsign: true
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
cache: maven
|
||||
server-id: sonatype-nexus
|
||||
server-username: SERVER_USERNAME
|
||||
server-password: SERVER_PASSWORD
|
||||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
gpg-passphrase: GPG_PASSPHRASE
|
||||
- run: mvn $MAVEN_ARGS deploy
|
||||
env:
|
||||
SERVER_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
|
||||
SERVER_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
|
58
.github/workflows/pr.yaml
vendored
58
.github/workflows/pr.yaml
vendored
|
@ -1,58 +0,0 @@
|
|||
name: PullRequest
|
||||
|
||||
on: pull_request
|
||||
|
||||
env:
|
||||
MAVEN_ARGS: --batch-mode --color=always --no-transfer-progress
|
||||
|
||||
jobs:
|
||||
|
||||
yaml:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ibiqlik/action-yamllint@v3
|
||||
with:
|
||||
format: colored
|
||||
strict: true
|
||||
|
||||
markdown:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: avto-dev/markdown-lint@v1
|
||||
with:
|
||||
args: /github/workspace
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
cache: maven
|
||||
- run: mvn $MAVEN_ARGS verify
|
||||
|
||||
versions:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version:
|
||||
- 22.0.5
|
||||
- 23.0.7
|
||||
- 24.0.5
|
||||
- 25.0.6
|
||||
- 26.0.8
|
||||
- 26.1.5
|
||||
- 26.2.5
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
cache: maven
|
||||
- run: mvn $MAVEN_ARGS verify -Dcheck.skip -Dversion.org.keycloak.test=${{ matrix.version }}
|
50
.github/workflows/release.yaml
vendored
50
.github/workflows/release.yaml
vendored
|
@ -1,50 +0,0 @@
|
|||
name: Release
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
MAVEN_ARGS: --batch-mode --color=always --no-transfer-progress --settings=.github/settings.xml
|
||||
steps:
|
||||
- name: docker/login-action docker.io
|
||||
uses: docker/login-action@v3.4.0
|
||||
with:
|
||||
registry: docker.io
|
||||
username: ${{ secrets.DOCKERIO_USERNAME }}
|
||||
password: ${{ secrets.DOCKERIO_TOKEN }}
|
||||
- name: docker/login-action ghcr.io
|
||||
uses: docker/login-action@v3.4.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GIT_ACTION_TOKEN }}
|
||||
- run: git config --global user.name "${{ vars.KOKUWA_IO_BOT_NAME }}"
|
||||
- run: git config --global user.email "${{ vars.KOKUWA_IO_BOT_EMAIL }}"
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GIT_ACTION_TOKEN }}
|
||||
- uses: crazy-max/ghaction-import-gpg@v6
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
git_user_signingkey: true
|
||||
git_commit_gpgsign: true
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
cache: maven
|
||||
server-id: sonatype-nexus
|
||||
server-username: SERVER_USERNAME
|
||||
server-password: SERVER_PASSWORD
|
||||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
gpg-passphrase: GPG_PASSPHRASE
|
||||
- run: mvn $MAVEN_ARGS release:prepare -Darguments="$MAVEN_ARGS"
|
||||
- run: mvn $MAVEN_ARGS release:perform -Darguments="$MAVEN_ARGS"
|
||||
env:
|
||||
SERVER_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
|
||||
SERVER_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
|
||||
GIT_ACTION_TOKEN: ${{ secrets.GIT_ACTION_TOKEN }}
|
||||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
60
.github/workflows/verify.yaml
vendored
Normal file
60
.github/workflows/verify.yaml
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
name: Verify
|
||||
|
||||
on:
|
||||
- pull_request
|
||||
- push:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
MAVEN_ARGS: --batch-mode --color=always --no-transfer-progress
|
||||
|
||||
jobs:
|
||||
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- uses: docker://kokuwaio/renovate-config-validator
|
||||
|
||||
markdownlint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- uses: docker://kokuwaio/markdownlint
|
||||
|
||||
yamllint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- uses: docker://kokuwaio/yamllint
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- uses: actions/setup-java@main
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
cache: maven
|
||||
- run: mvn verify
|
||||
|
||||
versions:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version:
|
||||
- 22.0.5
|
||||
- 23.0.7
|
||||
- 24.0.5
|
||||
- 25.0.6
|
||||
- 26.2.5
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- uses: actions/setup-java@main
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
cache: maven
|
||||
- run: mvn verify -Dversion.org.keycloak.test=${{ matrix.version }}
|
24
.woodpecker/build.yaml
Normal file
24
.woodpecker/build.yaml
Normal file
|
@ -0,0 +1,24 @@
|
|||
when:
|
||||
instance: ci.kokuwa.io
|
||||
repo: kokuwaio/markdownlint
|
||||
event: [manual, push]
|
||||
branch: main
|
||||
path: [.woodpecker/build.yaml, pom.xml, src/main/**]
|
||||
|
||||
services:
|
||||
- name: dockerd
|
||||
image: kokuwaio/dockerd
|
||||
ports: [2375, 8080]
|
||||
|
||||
steps:
|
||||
|
||||
deploy:
|
||||
image: maven:3.9.9-eclipse-temurin-17
|
||||
commands: mvn deploy --settings=.woodpecker/maven/settings.xml
|
||||
environment:
|
||||
SONATYPE_ORG_USERNAME: {from_secret: sonatype_org_username}
|
||||
SONATYPE_ORG_PASSWORD: {from_secret: sonatype_org_password}
|
||||
DOCKER_IO_USERNAME: {from_secret: docker_io_username}
|
||||
DOCKER_IO_PASSWORD: {from_secret: docker_io_password}
|
||||
GHCR_IO_USERNAME: {from_secret: ghcr_io_username}
|
||||
GHCR_IO_PASSWORD: {from_secret: ghcr_io_password}
|
21
.woodpecker/lint.yaml
Normal file
21
.woodpecker/lint.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
when:
|
||||
event: [manual, pull_request, push]
|
||||
branch: main
|
||||
path: [.woodpecker/lint.yaml, renovate.json, "**/*.y*ml", "**/*.md"]
|
||||
|
||||
steps:
|
||||
|
||||
renovate:
|
||||
image: kokuwaio/renovate-config-validator
|
||||
depends_on: []
|
||||
when: [path: [.woodpecker/lint.yaml, renovate.json]]
|
||||
|
||||
yaml:
|
||||
image: kokuwaio/yamllint
|
||||
depends_on: []
|
||||
when: [path: [.woodpecker/lint.yaml, .yamllint.yaml, "**/*.y*ml"]]
|
||||
|
||||
markdown:
|
||||
image: kokuwaio/markdownlint
|
||||
depends_on: []
|
||||
when: [path: [.woodpecker/lint.yaml, .markdownlint.yaml, "**/*.md"]]
|
28
.woodpecker/maven/settings.xml
Normal file
28
.woodpecker/maven/settings.xml
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
|
||||
<interactiveMode>false</interactiveMode>
|
||||
<localRepository>/woodpecker/.m2</localRepository>
|
||||
<servers>
|
||||
<server>
|
||||
<id>sonatype.org</id>
|
||||
<username>${env.SONATYPE_ORG_USERNAME}</username>
|
||||
<password>${env.SONATYPE_ORG_PASSWORD}</password>
|
||||
</server>
|
||||
<server>
|
||||
<id>docker.io</id>
|
||||
<username>${env.DOCKER_IO_USERNAME}</username>
|
||||
<password>${env.DOCKER_IO_PASSWORD}</password>
|
||||
</server>
|
||||
<server>
|
||||
<id>ghcr.io</id>
|
||||
<username>${env.GHCR_IO_USERNAME}</username>
|
||||
<password>${env.GHCR_IO_PASSWORD}</password>
|
||||
</server>
|
||||
</servers>
|
||||
<mirrors>
|
||||
<mirror>
|
||||
<url>http://mirror.woodpecker.svc/maven2</url>
|
||||
<mirrorOf>central</mirrorOf>
|
||||
</mirror>
|
||||
</mirrors>
|
||||
</settings>
|
21
.woodpecker/verify.yaml
Normal file
21
.woodpecker/verify.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
when:
|
||||
event: [manual, pull_request]
|
||||
path: [.woodpecker/verify.yaml, pom.xml, src/**]
|
||||
|
||||
matrix:
|
||||
KEYCLOAK_VERSION:
|
||||
- 22.0.5
|
||||
- 23.0.7
|
||||
- 24.0.5
|
||||
- 25.0.6
|
||||
- 26.2.5
|
||||
|
||||
services:
|
||||
- name: dockerd
|
||||
image: kokuwaio/dockerd
|
||||
ports: [2375, 8080]
|
||||
|
||||
steps:
|
||||
verify:
|
||||
image: maven:3.9.9-eclipse-temurin-17
|
||||
commands: mvn verify --settings=.woodpecker/maven/settings.xml -Dversion.org.keycloak.test=$KEYCLOAK_VERSION
|
12
README.md
12
README.md
|
@ -1,10 +1,10 @@
|
|||
# Keycloak Metrics
|
||||
|
||||
Provides metrics for Keycloak user/admin events and user/client/session count. Tested on Keycloak [22-26](.github/workflows/pr.yaml#L48-L53).
|
||||
Provides metrics for Keycloak user/admin events and user/client/session count. Tested on Keycloak [22-26](.woodpecker/verify.yaml#L7-L11).
|
||||
|
||||
[](http://www.apache.org/licenses/)
|
||||
[](https://central.sonatype.com/search?namespace=io.kokuwa.keycloak&q=keycloak-event-metrics)
|
||||
[](https://github.com/kokuwaio/keycloak-event-metrics/actions/workflows/build.yaml)
|
||||
[](https://ci.kokuwa.io/api/badges/keycloak/keycloak-event-metrics/)
|
||||
|
||||
## Why?
|
||||
|
||||
|
@ -114,7 +114,7 @@ If scrapping takes less than `KC_METRICS_STATS_INFO_THRESHOLD` duration will be
|
|||
|
||||
### Grafana Dashboard
|
||||
|
||||
Can be found here: [kokuwaio/keycloak keycloak-metrics.json](https://github.com/kokuwaio/keycloak/blob/main/src/test/k3s/dev/grafana/files/dashboards/keycloak-metrics.json)
|
||||
Can be found here: [keycloak-metrics.json](https://git.kokuwa.io/keycloak/keycloak/blob/main/src/test/k3s/dev/grafana/files/dashboards/keycloak-metrics.json)
|
||||
|
||||
### Testcontainers
|
||||
|
||||
|
@ -131,7 +131,7 @@ This images are based on busybox, so you can use cp to copy the jar into your ke
|
|||
|
||||
### Docker
|
||||
|
||||
Check: [kokuwaio/keycloak](https://github.com/kokuwaio/keycloak)
|
||||
Check: [kowaio/keycloak](https://git.kokuwa.io/keycloak/keycloak)
|
||||
|
||||
Dockerfile:
|
||||
|
||||
|
@ -145,7 +145,7 @@ FROM debian:stable-slim AS metrics
|
|||
RUN apt-get -qq update
|
||||
RUN apt-get -qq install --yes --no-install-recommends ca-certificates wget
|
||||
|
||||
ARG METRICS_VERSION=1.0.0
|
||||
ARG METRICS_VERSION=1.1.1
|
||||
ARG METRICS_FILE=keycloak-event-metrics-${METRICS_VERSION}.jar
|
||||
ARG METRICS_URL=https://repo1.maven.org/maven2/io/kokuwa/keycloak/keycloak-event-metrics/${METRICS_VERSION}
|
||||
|
||||
|
@ -159,7 +159,7 @@ RUN mv ${METRICS_FILE} /opt/keycloak/providers
|
|||
### build keycloak with metrics
|
||||
###
|
||||
|
||||
FROM quay.io/keycloak/keycloak:25.0.1
|
||||
FROM quay.io/keycloak/keycloak:25.2.5
|
||||
|
||||
ENV KEYCLOAK_ADMIN=admin
|
||||
ENV KEYCLOAK_ADMIN_PASSWORD=password
|
||||
|
|
76
pom.xml
76
pom.xml
|
@ -8,7 +8,7 @@
|
|||
|
||||
<name>Keycloak Metrics</name>
|
||||
<description>Provides metrics for Keycloak user/admin events</description>
|
||||
<url>https://github.com/kokuwaio/keycloak-event-metrics</url>
|
||||
<url>https://git.kokuwa.io/keycloak/keycloak-event-metrics</url>
|
||||
<inceptionYear>2023</inceptionYear>
|
||||
<organization>
|
||||
<name>Kokuwa.io</name>
|
||||
|
@ -33,27 +33,23 @@
|
|||
</developers>
|
||||
|
||||
<scm>
|
||||
<url>https://github.com/kokuwaio/keycloak-event-metrics</url>
|
||||
<connection>scm:git:https://github.com/kokuwaio/keycloak-event-metrics.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/kokuwaio/keycloak-event-metrics.git</developerConnection>
|
||||
<url>https://git.kokuwa.io/keycloak/keycloak-event-metrics</url>
|
||||
<connection>https://git.kokuwa.io/keycloak/keycloak-event-metrics.git</connection>
|
||||
<developerConnection>https://git.kokuwa.io/keycloak/keycloak-event-metrics.git</developerConnection>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
<issueManagement>
|
||||
<system>github</system>
|
||||
<url>https://github.com/kokuwaio/keycloak-event-metrics/issues</url>
|
||||
<system>forgejo</system>
|
||||
<url>https://git.kokuwa.io/keycloak/keycloak-event-metrics/issues</url>
|
||||
</issueManagement>
|
||||
<ciManagement>
|
||||
<system>github</system>
|
||||
<url>https://github.com/kokuwaio/keycloak-event-metrics/actions</url>
|
||||
<system>woodpecker</system>
|
||||
<url>https://ci.kokuwa.io/repos/keycloak/keycloak-event-metrics</url>
|
||||
</ciManagement>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>sonatype-nexus</id>
|
||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>sonatype-nexus</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
<id>sonatype.org</id>
|
||||
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
|
@ -97,7 +93,7 @@
|
|||
<version.org.apache.maven.plugins.surefire>3.5.3</version.org.apache.maven.plugins.surefire>
|
||||
<version.org.codehaus.mojo.tidy>1.4.0</version.org.codehaus.mojo.tidy>
|
||||
<version.org.codehaus.mojo.versions>2.18.0</version.org.codehaus.mojo.versions>
|
||||
<version.org.sonatype.plugins.nexus>1.7.0</version.org.sonatype.plugins.nexus>
|
||||
<version.org.sonatype.central>0.7.0</version.org.sonatype.central>
|
||||
<version.net.revelc.code.formatter>2.26.0</version.net.revelc.code.formatter>
|
||||
<version.net.revelc.code.impsort>1.12.0</version.net.revelc.code.impsort>
|
||||
<version.io.fabric8.docker>0.46.0</version.io.fabric8.docker>
|
||||
|
@ -324,9 +320,9 @@
|
|||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>${version.org.sonatype.plugins.nexus}</version>
|
||||
<groupId>org.sonatype.central</groupId>
|
||||
<artifactId>central-publishing-maven-plugin</artifactId>
|
||||
<version>${version.org.sonatype.central}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>net.revelc.code.formatter</groupId>
|
||||
|
@ -507,12 +503,28 @@
|
|||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>javadoc-no-fork</goal>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- sign before upload -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<signer>bc</signer>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- docker image -->
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
|
@ -609,32 +621,16 @@
|
|||
<id>release</id>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<!-- sign before upload -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- autoclose sonatype nexus repo -->
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<groupId>org.sonatype.central</groupId>
|
||||
<artifactId>central-publishing-maven-plugin</artifactId>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<serverId>sonatype-nexus</serverId>
|
||||
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
||||
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
||||
<publishingServerId>sonatype.org</publishingServerId>
|
||||
<autoPublish>true</autoPublish>
|
||||
<waitUntil>published</waitUntil>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
|
33
renovate.json
Normal file
33
renovate.json
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"labels": ["renovate", "renovate-manager/{{{manager}}}", "renovate-type/{{{updateType}}}"],
|
||||
"dependencyDashboard": true,
|
||||
"dependencyDashboardLabels": ["renovate"],
|
||||
"dependencyDashboardApproval": true,
|
||||
"dependencyDashboardOSVVulnerabilitySummary": "all",
|
||||
"separateMajorMinor": true,
|
||||
"separateMinorPatch": true,
|
||||
"separateMultipleMinor": true,
|
||||
"separateMultipleMajor": true,
|
||||
"pinDigests": true,
|
||||
"automerge": false,
|
||||
"automergeStrategy": "fast-forward",
|
||||
"rebaseWhen": "behind-base-branch",
|
||||
"packageRules": [
|
||||
{
|
||||
"matchUpdateTypes": ["digest"],
|
||||
"dependencyDashboardApproval": false,
|
||||
"automergeType": "branch"
|
||||
},{
|
||||
"matchUpdateTypes": ["patch"],
|
||||
"dependencyDashboardApproval": false,
|
||||
"automerge": true
|
||||
},{
|
||||
"matchUpdateTypes": ["minor"],
|
||||
"dependencyDashboardApproval": false
|
||||
},{
|
||||
"matchManagers": ["woodpecker"],
|
||||
"pinDigests": false
|
||||
}
|
||||
]
|
||||
}
|
|
@ -15,6 +15,7 @@ import org.junit.jupiter.api.extension.ParameterContext;
|
|||
import org.junit.jupiter.api.extension.ParameterResolver;
|
||||
import org.keycloak.admin.client.Keycloak;
|
||||
import org.keycloak.admin.client.token.TokenService;
|
||||
import org.testcontainers.containers.FixedHostPortGenericContainer;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
import org.testcontainers.containers.wait.strategy.Wait;
|
||||
import org.testcontainers.utility.MountableFile;
|
||||
|
@ -45,13 +46,16 @@ public class KeycloakExtension implements BeforeAllCallback, ParameterResolver {
|
|||
throw new Exception("Failed to read properties", e);
|
||||
}
|
||||
var version = properties.getProperty("version");
|
||||
var image = "quay.io/keycloak/keycloak:" + version;
|
||||
var jar = properties.getProperty("jar");
|
||||
var timeout = properties.getProperty("timeout");
|
||||
|
||||
// create and start container
|
||||
|
||||
@SuppressWarnings("resource")
|
||||
var container = new GenericContainer<>("quay.io/keycloak/keycloak:" + version)
|
||||
@SuppressWarnings({ "resource", "deprecation" })
|
||||
var container = System.getenv("CI") == null
|
||||
? new GenericContainer<>(image).withExposedPorts(8080)
|
||||
: new FixedHostPortGenericContainer<>(image).withFixedExposedPort(8080, 8080)
|
||||
.withEnv("KEYCLOAK_ADMIN", "admin")
|
||||
.withEnv("KEYCLOAK_ADMIN_PASSWORD", "password")
|
||||
.withEnv("KC_LOG_LEVEL", "io.kokuwa:trace")
|
||||
|
@ -63,9 +67,8 @@ public class KeycloakExtension implements BeforeAllCallback, ParameterResolver {
|
|||
.withEnv("KC_METRICS_STATS_INTERVAL", "PT1s")
|
||||
.withCopyFileToContainer(MountableFile.forHostPath(jar), "/opt/keycloak/providers/metrics.jar")
|
||||
.withLogConsumer(out -> System.out.print(out.getUtf8String()))
|
||||
.withExposedPorts(8080)
|
||||
.withStartupTimeout(Duration.parse(timeout))
|
||||
.waitingFor(Wait.forHttp("/health").forPort(8080))
|
||||
.waitingFor(Wait.forHttp("/health").forPort(8080).withStartupTimeout(Duration.ofMinutes(10)))
|
||||
.withCommand("start-dev");
|
||||
try {
|
||||
container.start();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue