Compare commits
2 commits
21395d9389
...
ce770835ff
Author | SHA1 | Date | |
---|---|---|---|
ce770835ff | |||
2c76a60c18 |
14 changed files with 249 additions and 220 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 }}
|
|
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 }}
|
|
|
@ -1,34 +1,38 @@
|
||||||
name: PullRequest
|
name: Verify
|
||||||
|
|
||||||
on: pull_request
|
on:
|
||||||
|
- pull_request
|
||||||
|
- push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
MAVEN_ARGS: --batch-mode --color=always --no-transfer-progress
|
MAVEN_ARGS: --batch-mode --color=always --no-transfer-progress
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
yaml:
|
renovate:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@main
|
||||||
- uses: ibiqlik/action-yamllint@v3
|
- uses: docker://kokuwaio/renovate-config-validator
|
||||||
with:
|
|
||||||
format: colored
|
|
||||||
strict: true
|
|
||||||
|
|
||||||
markdown:
|
markdownlint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@main
|
||||||
- uses: avto-dev/markdown-lint@v1
|
- uses: docker://kokuwaio/markdownlint
|
||||||
with:
|
|
||||||
args: /github/workspace
|
yamllint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@main
|
||||||
|
- uses: docker://kokuwaio/yamllint
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@main
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@main
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
@ -49,8 +53,8 @@ jobs:
|
||||||
- 26.1.5
|
- 26.1.5
|
||||||
- 26.2.5
|
- 26.2.5
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@main
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@main
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
22
.woodpecker/build.yaml
Normal file
22
.woodpecker/build.yaml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
when:
|
||||||
|
event: [manual, push]
|
||||||
|
branch: main
|
||||||
|
path: [.woodpecker/build.yaml, pom.xml, src/**]
|
||||||
|
|
||||||
|
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_USERNAME: {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>oss.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>
|
23
.woodpecker/verify.yaml
Normal file
23
.woodpecker/verify.yaml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
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.0.8
|
||||||
|
- 26.1.5
|
||||||
|
- 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
|
121
pom.xml
121
pom.xml
|
@ -95,12 +95,12 @@
|
||||||
<version.org.apache.maven.plugins.site>3.21.0</version.org.apache.maven.plugins.site>
|
<version.org.apache.maven.plugins.site>3.21.0</version.org.apache.maven.plugins.site>
|
||||||
<version.org.apache.maven.plugins.source>3.3.1</version.org.apache.maven.plugins.source>
|
<version.org.apache.maven.plugins.source>3.3.1</version.org.apache.maven.plugins.source>
|
||||||
<version.org.apache.maven.plugins.surefire>3.5.3</version.org.apache.maven.plugins.surefire>
|
<version.org.apache.maven.plugins.surefire>3.5.3</version.org.apache.maven.plugins.surefire>
|
||||||
<version.org.codehaus.mojo.exec>3.5.1</version.org.codehaus.mojo.exec>
|
|
||||||
<version.org.codehaus.mojo.tidy>1.4.0</version.org.codehaus.mojo.tidy>
|
<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.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.plugins.nexus>1.7.0</version.org.sonatype.plugins.nexus>
|
||||||
<version.net.revelc.code.formatter>2.26.0</version.net.revelc.code.formatter>
|
<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.net.revelc.code.impsort>1.12.0</version.net.revelc.code.impsort>
|
||||||
|
<version.io.fabric8.docker>0.46.0</version.io.fabric8.docker>
|
||||||
|
|
||||||
<version.org.keycloak>26.2.5</version.org.keycloak>
|
<version.org.keycloak>26.2.5</version.org.keycloak>
|
||||||
<version.org.keycloak.test>${version.org.keycloak}</version.org.keycloak.test>
|
<version.org.keycloak.test>${version.org.keycloak}</version.org.keycloak.test>
|
||||||
|
@ -219,7 +219,6 @@
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>${project.artifactId}</finalName>
|
|
||||||
<testResources>
|
<testResources>
|
||||||
<testResource>
|
<testResource>
|
||||||
<directory>${project.basedir}/src/test/resources</directory>
|
<directory>${project.basedir}/src/test/resources</directory>
|
||||||
|
@ -308,11 +307,6 @@
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>${version.org.apache.maven.plugins.surefire}</version>
|
<version>${version.org.apache.maven.plugins.surefire}</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
|
||||||
<version>${version.org.codehaus.mojo.exec}</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>tidy-maven-plugin</artifactId>
|
<artifactId>tidy-maven-plugin</artifactId>
|
||||||
|
@ -347,6 +341,11 @@
|
||||||
<artifactId>impsort-maven-plugin</artifactId>
|
<artifactId>impsort-maven-plugin</artifactId>
|
||||||
<version>${version.net.revelc.code.impsort}</version>
|
<version>${version.net.revelc.code.impsort}</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>io.fabric8</groupId>
|
||||||
|
<artifactId>docker-maven-plugin</artifactId>
|
||||||
|
<version>${version.io.fabric8.docker}</version>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
@ -516,49 +515,91 @@
|
||||||
|
|
||||||
<!-- docker image -->
|
<!-- docker image -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>io.fabric8</groupId>
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>docker-maven-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>prepare-package</phase>
|
<id>build</id>
|
||||||
|
<phase>install</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>copy-resources</goal>
|
<goal>build</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<directory>${project.basedir}/src/main/docker</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
<execution>
|
||||||
|
<id>push</id>
|
||||||
<phase>deploy</phase>
|
<phase>deploy</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>exec</goal>
|
<goal>push</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
|
||||||
<executable>docker</executable>
|
|
||||||
<arguments>
|
|
||||||
<argument>build</argument>
|
|
||||||
<argument>${project.build.directory}</argument>
|
|
||||||
<argument>--tag=ghcr.io/kokuwaio/keycloak-event-metrics:latest</argument>
|
|
||||||
<argument>--tag=ghcr.io/kokuwaio/keycloak-event-metrics:${project.version}</argument>
|
|
||||||
<argument>--tag=docker.io/kokuwaio/keycloak-event-metrics:latest</argument>
|
|
||||||
<argument>--tag=docker.io/kokuwaio/keycloak-event-metrics:${project.version}</argument>
|
|
||||||
<argument>--push</argument>
|
|
||||||
</arguments>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<verbose>build</verbose>
|
||||||
|
<images>
|
||||||
|
<image>
|
||||||
|
<name>docker.io/kokuwaio/keycloak-event-metrics:${project.version}</name>
|
||||||
|
<build>
|
||||||
|
<from>docker.io/library/busybox:1.37.0-uclibc@sha256:cc57e0ff4b6d3138931ff5c7180d18078813300e2508a25fb767a4d36df30d4d</from>
|
||||||
|
<assembly>
|
||||||
|
<basedir>${file.separator}</basedir>
|
||||||
|
<inline>
|
||||||
|
<files>
|
||||||
|
<file>
|
||||||
|
<source>${project.build.directory}/${project.build.finalName}.jar</source>
|
||||||
|
<destName>${project.artifactId}.jar</destName>
|
||||||
|
<fileMode>444</fileMode>
|
||||||
|
</file>
|
||||||
|
</files>
|
||||||
|
</inline>
|
||||||
|
</assembly>
|
||||||
|
<labels>
|
||||||
|
<!-- https://github.com/opencontainers/image-spec/blob/main/annotations.md -->
|
||||||
|
<org.opencontainers.image.title>${project.name}</org.opencontainers.image.title>
|
||||||
|
<org.opencontainers.image.description>${project.description}</org.opencontainers.image.description>
|
||||||
|
<org.opencontainers.image.url>${project.url}</org.opencontainers.image.url>
|
||||||
|
<org.opencontainers.image.source>${project.scm.url}</org.opencontainers.image.source>
|
||||||
|
<org.opencontainers.image.vendor>${project.organization.name}</org.opencontainers.image.vendor>
|
||||||
|
<org.opencontainers.image.authors>https://github.com/orgs/kokuwaio/people</org.opencontainers.image.authors>
|
||||||
|
<org.opencontainers.image.licenses>${project.licenses[0].name}</org.opencontainers.image.licenses>
|
||||||
|
<org.opencontainers.image.version>${project.version}</org.opencontainers.image.version>
|
||||||
|
<org.opencontainers.image.base.name>docker.io/library/busybox:1.37.0-uclibc</org.opencontainers.image.base.name>
|
||||||
|
<org.opencontainers.image.base.digest>sha256:cc57e0ff4b6d3138931ff5c7180d18078813300e2508a25fb767a4d36df30d4d</org.opencontainers.image.base.digest>
|
||||||
|
</labels>
|
||||||
|
</build>
|
||||||
|
</image>
|
||||||
|
<image>
|
||||||
|
<name>ghcr.io/kokuwaio/keycloak-event-metrics:${project.version}</name>
|
||||||
|
<build>
|
||||||
|
<from>docker.io/library/busybox:1.37.0-uclibc@sha256:cc57e0ff4b6d3138931ff5c7180d18078813300e2508a25fb767a4d36df30d4d</from>
|
||||||
|
<assembly>
|
||||||
|
<basedir>${file.separator}</basedir>
|
||||||
|
<inline>
|
||||||
|
<files>
|
||||||
|
<file>
|
||||||
|
<source>${project.build.directory}/${project.build.finalName}.jar</source>
|
||||||
|
<destName>${project.artifactId}.jar</destName>
|
||||||
|
<fileMode>444</fileMode>
|
||||||
|
</file>
|
||||||
|
</files>
|
||||||
|
</inline>
|
||||||
|
</assembly>
|
||||||
|
<labels>
|
||||||
|
<!-- https://github.com/opencontainers/image-spec/blob/main/annotations.md -->
|
||||||
|
<org.opencontainers.image.title>${project.name}</org.opencontainers.image.title>
|
||||||
|
<org.opencontainers.image.description>${project.description}</org.opencontainers.image.description>
|
||||||
|
<org.opencontainers.image.url>${project.url}</org.opencontainers.image.url>
|
||||||
|
<org.opencontainers.image.source>${project.scm.url}</org.opencontainers.image.source>
|
||||||
|
<org.opencontainers.image.vendor>${project.organization.name}</org.opencontainers.image.vendor>
|
||||||
|
<org.opencontainers.image.authors>https://github.com/orgs/kokuwaio/people</org.opencontainers.image.authors>
|
||||||
|
<org.opencontainers.image.licenses>${project.licenses[0].name}</org.opencontainers.image.licenses>
|
||||||
|
<org.opencontainers.image.version>${project.version}</org.opencontainers.image.version>
|
||||||
|
<org.opencontainers.image.base.name>docker.io/library/busybox:1.37.0-uclibc</org.opencontainers.image.base.name>
|
||||||
|
<org.opencontainers.image.base.digest>sha256:cc57e0ff4b6d3138931ff5c7180d18078813300e2508a25fb767a4d36df30d4d</org.opencontainers.image.base.digest>
|
||||||
|
</labels>
|
||||||
|
</build>
|
||||||
|
</image>
|
||||||
|
</images>
|
||||||
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
|
@ -588,7 +629,7 @@
|
||||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||||
<extensions>true</extensions>
|
<extensions>true</extensions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<serverId>sonatype-nexus</serverId>
|
<serverId>oss.sonatype.org</serverId>
|
||||||
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
||||||
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -1,14 +0,0 @@
|
||||||
FROM busybox:latest
|
|
||||||
|
|
||||||
# https://github.com/opencontainers/image-spec/blob/main/annotations.md
|
|
||||||
LABEL org.opencontainers.image.title ${project.name}
|
|
||||||
LABEL org.opencontainers.image.description ${project.description}
|
|
||||||
LABEL org.opencontainers.image.url ${project.url}
|
|
||||||
LABEL org.opencontainers.image.source ${project.url}/src/main/docker/Dockerfile
|
|
||||||
LABEL org.opencontainers.image.vendor ${project.organization.name}
|
|
||||||
LABEL org.opencontainers.image.authors https://github.com/orgs/kokuwaio/people
|
|
||||||
LABEL org.opencontainers.image.licenses Apache-2.0
|
|
||||||
LABEL org.opencontainers.image.version ${project.version}
|
|
||||||
LABEL org.opencontainers.image.base.name busybox:latest
|
|
||||||
|
|
||||||
COPY ${project.build.finalName}.jar /keycloak-event-metrics.jar
|
|
|
@ -15,6 +15,7 @@ import org.junit.jupiter.api.extension.ParameterContext;
|
||||||
import org.junit.jupiter.api.extension.ParameterResolver;
|
import org.junit.jupiter.api.extension.ParameterResolver;
|
||||||
import org.keycloak.admin.client.Keycloak;
|
import org.keycloak.admin.client.Keycloak;
|
||||||
import org.keycloak.admin.client.token.TokenService;
|
import org.keycloak.admin.client.token.TokenService;
|
||||||
|
import org.testcontainers.containers.FixedHostPortGenericContainer;
|
||||||
import org.testcontainers.containers.GenericContainer;
|
import org.testcontainers.containers.GenericContainer;
|
||||||
import org.testcontainers.containers.wait.strategy.Wait;
|
import org.testcontainers.containers.wait.strategy.Wait;
|
||||||
import org.testcontainers.utility.MountableFile;
|
import org.testcontainers.utility.MountableFile;
|
||||||
|
@ -45,13 +46,16 @@ public class KeycloakExtension implements BeforeAllCallback, ParameterResolver {
|
||||||
throw new Exception("Failed to read properties", e);
|
throw new Exception("Failed to read properties", e);
|
||||||
}
|
}
|
||||||
var version = properties.getProperty("version");
|
var version = properties.getProperty("version");
|
||||||
|
var image = "quay.io/keycloak/keycloak:" + version;
|
||||||
var jar = properties.getProperty("jar");
|
var jar = properties.getProperty("jar");
|
||||||
var timeout = properties.getProperty("timeout");
|
var timeout = properties.getProperty("timeout");
|
||||||
|
|
||||||
// create and start container
|
// create and start container
|
||||||
|
|
||||||
@SuppressWarnings("resource")
|
@SuppressWarnings({ "resource", "deprecation" })
|
||||||
var container = new GenericContainer<>("quay.io/keycloak/keycloak:" + version)
|
var container = System.getenv("CI") == null
|
||||||
|
? new GenericContainer<>(image).withExposedPorts(8080)
|
||||||
|
: new FixedHostPortGenericContainer<>(image).withFixedExposedPort(8080, 8080)
|
||||||
.withEnv("KEYCLOAK_ADMIN", "admin")
|
.withEnv("KEYCLOAK_ADMIN", "admin")
|
||||||
.withEnv("KEYCLOAK_ADMIN_PASSWORD", "password")
|
.withEnv("KEYCLOAK_ADMIN_PASSWORD", "password")
|
||||||
.withEnv("KC_LOG_LEVEL", "io.kokuwa:trace")
|
.withEnv("KC_LOG_LEVEL", "io.kokuwa:trace")
|
||||||
|
@ -63,9 +67,8 @@ public class KeycloakExtension implements BeforeAllCallback, ParameterResolver {
|
||||||
.withEnv("KC_METRICS_STATS_INTERVAL", "PT1s")
|
.withEnv("KC_METRICS_STATS_INTERVAL", "PT1s")
|
||||||
.withCopyFileToContainer(MountableFile.forHostPath(jar), "/opt/keycloak/providers/metrics.jar")
|
.withCopyFileToContainer(MountableFile.forHostPath(jar), "/opt/keycloak/providers/metrics.jar")
|
||||||
.withLogConsumer(out -> System.out.print(out.getUtf8String()))
|
.withLogConsumer(out -> System.out.print(out.getUtf8String()))
|
||||||
.withExposedPorts(8080)
|
|
||||||
.withStartupTimeout(Duration.parse(timeout))
|
.withStartupTimeout(Duration.parse(timeout))
|
||||||
.waitingFor(Wait.forHttp("/health").forPort(8080))
|
.waitingFor(Wait.forHttp("/health").forPort(8080).withStartupTimeout(Duration.ofMinutes(10)))
|
||||||
.withCommand("start-dev");
|
.withCommand("start-dev");
|
||||||
try {
|
try {
|
||||||
container.start();
|
container.start();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue