Rewrite build config to kokuwa.io infrastructure
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/manual/lint Pipeline failed
ci/woodpecker/manual/verify/2 Pipeline failed
ci/woodpecker/manual/verify/1 Pipeline was successful
ci/woodpecker/manual/build Pipeline failed

This commit is contained in:
Stephan Schnabel 2025-06-23 17:25:33 +02:00
parent 61e7955732
commit 1f5620514e
Signed by: stephan.schnabel
SSH key fingerprint: SHA256:99zuzxNGFb5/5P+E/O7ONU2qhUojUe/D8rIPTW+9Xp0
17 changed files with 309 additions and 400 deletions

39
.woodpecker/build.yaml Normal file
View file

@ -0,0 +1,39 @@
when:
instance: ci.kokuwa.io
repo: keycloak/keycloak-event-metrics
event: [manual, push]
branch: main
path: [.woodpecker/build.yaml, pom.xml, src/main/**]
services:
- name: dockerd
image: kokuwaio/dockerd
privileged: true
ports: [2375, 8080]
steps:
deploy:
image: maven:3.9.9-eclipse-temurin-17
commands: mvn deploy
environment:
MAVEN_ARGS: --batch-mode --color=always --no-transfer-progress --settings=.woodpecker/maven/settings.xml
MAVEN_GPG_KEY: {from_secret: woodpecker_gpg_key}
SONATYPE_ORG_USERNAME: {from_secret: sonatype_org_username}
SONATYPE_ORG_PASSWORD: {from_secret: sonatype_org_password}
release:
image: maven:3.9.9-eclipse-temurin-17
commands:
- git config user.email "$GIT_USER_EMAIL"
- git config user.name "$GIT_USER_NAME"
- mvn release:prepare release:perform --settings=.woodpecker/maven/settings.xml
environment:
MAVEN_ARGS: --batch-mode --color=always --no-transfer-progress -DskipTests -DautoPublish=false
MAVEN_GPG_KEY: {from_secret: woodpecker_gpg_key}
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
View 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"]]

View 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.cluster.local/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>

25
.woodpecker/release.yaml Normal file
View file

@ -0,0 +1,25 @@
when:
instance: ci.kokuwa.io
repo: keycloak/keycloak-event-metrics
event: deployment
branch: main
services:
- name: dockerd
image: kokuwaio/dockerd
ports: [2375, 8080]
steps:
deploy:
image: maven:3.9.9-eclipse-temurin-17
commands: mvn release:prepare release:perform --settings=.woodpecker/maven/settings.xml
environment:
MAVEN_ARGS: --batch-mode --color=always --no-transfer-progress -DskipTests -DautoPublish=false
MAVEN_GPG_KEY: {from_secret: woodpecker_gpg_key}
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}

26
.woodpecker/verify.yaml Normal file
View file

@ -0,0 +1,26 @@
when:
event: [manual, pull_request]
path: [.woodpecker/verify.yaml, pom.xml, src/main/**]
matrix:
KEYCLOAK_VERSION:
# - 22.0.5
# - 23.0.7
# - 24.0.5
# - 25.0.6
- 26.2.5
- $$version.org.keycloak
services:
- name: dockerd
image: kokuwaio/dockerd
privileged: true
ports: [2375, 8080]
steps:
veraify:
image: maven:3.9.9-eclipse-temurin-17
commands: echo $KEYCLOAK_VERSION
verify:
image: maven:3.9.9-eclipse-temurin-17
commands: mvn test -Dversion.org.keycloak.test=$KEYCLOAK_VERSION --batch-mode --color=always --no-transfer-progress --settings=.woodpecker/maven/settings.xml