Skip to content

Commit d21a252

Browse files
committed
Merge remote-tracking branch 'aiven-commons/main'
2 parents c97423f + 37e3d6d commit d21a252

58 files changed

Lines changed: 6471 additions & 5 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: ❓ Ask a question
3+
about: Got stuck or missing something from the docs? Ask away!
4+
---
5+
6+
# What can we help you with?
7+
8+
<!-- Try to explain your question with as much detail as you can provide. -->
9+
10+
# Where would you expect to find this information?
11+
12+
<!-- Feel free to point us where with links or even proposing new sections or pages in the documentation. -->
13+

.github/ISSUE_TEMPLATE/02_bug.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: 🐜 Report a bug
3+
about: Spotted a problem? Let us know
4+
---
5+
6+
# What happened?
7+
8+
<!-- Try to be as precise as possible. If you can a small reproducer example would be great! -->
9+
10+
# What did you expect to happen?
11+
12+
<!-- Please explain what would be the expected behavior for this particular case, ideally, with examples. -->
13+
14+
# What else do we need to know?
15+
16+
<!-- Include your platform, version, and any other information that seems relevant. -->
17+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: 💡 Feature suggestion
3+
about: What would make this even better?
4+
---
5+
6+
# What is currently missing?
7+
8+
<!-- Please, describe what is currently missing and why should it be present in the project. -->
9+
10+
# How could this be improved?
11+
12+
<!-- If you already know how this could be approached, please provide some brief explanation about it. -->
13+
14+
# Is this a feature you would work on yourself?
15+
16+
* [ ] I plan to open a pull request for this feature

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Aiven Security Bug Bounty
4+
url: https://hackerone.com/aiven_ltd
5+
about: Our bug bounty program.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!-- All contributors please complete these sections, including maintainers -->
2+
# About this change - What it does
3+
4+
<!-- Provide a small sentence that summarizes the change. -->
5+
6+
<!-- Provide the issue number below if it exists. -->
7+
Resolves: #xxxxx
8+
9+
# Why this way
10+
11+
<!-- Provide a small explanation on why this is the approach you took for solving this problem. -->
12+

.github/workflows/Merge_check.yml

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
#
2+
# Copyright 2025 Aiven Oy and project contributors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing,
11+
# software distributed under the License is distributed on an
12+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
13+
# KIND, either express or implied. See the License for the
14+
# specific language governing permissions and limitations
15+
# under the License.
16+
#
17+
# SPDX-License-Identifier: Apache-2
18+
19+
# Workflow to check pull requests and new commits to main branches
20+
# This checks the source in the state as if after the merge.
21+
name: Main push checks
22+
on:
23+
push:
24+
branches:
25+
- 'main'
26+
27+
# Disallow concurrent runs for the same PR by cancelling in-progress runs
28+
# when new commits are pushed
29+
concurrency:
30+
group: ${{ github.workflow }}-${{ github.ref }}
31+
cancel-in-progress: true
32+
33+
jobs:
34+
# builds aiven-commons and all modules. Does not deploy.
35+
build:
36+
37+
strategy:
38+
matrix:
39+
java: [ 17, 20, 21, 25 ]
40+
fail-fast: false
41+
42+
name: JDK-${{ matrix.java }} Build
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Checkout code
46+
uses: actions/checkout@v6
47+
48+
- name: Configure artifact caching
49+
uses: actions/cache@v5
50+
with:
51+
path: ~/.m2/repository
52+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
53+
restore-keys: |
54+
${{ runner.os }}-maven-
55+
56+
- name: Set up JDK ${{ matrix.java }}
57+
uses: actions/setup-java@v4
58+
with:
59+
distribution: 'adopt'
60+
java-version: ${{ matrix.java }}
61+
cache: 'maven'
62+
63+
- name: Extract version info
64+
run: |
65+
echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_OUTPUT;
66+
echo "java_version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_OUTPUT;
67+
id: project
68+
69+
- name: Build ${{ steps.project.outputs.version }}
70+
run: mvn -e -B -V -ntp clean verify
71+
72+
- name: "Upload build failure reports"
73+
uses: actions/upload-artifact@v7
74+
if: failure()
75+
with:
76+
name: unit-test-results-${{ matrix.java }}-JDK
77+
path: |
78+
**/target/*-reports/**
79+
retention-days: 1
80+
81+
# javadoc has issues with java 17
82+
- name: Generate javadoc
83+
if: ${{ matrix.java != 17 }}
84+
run: mvn -e -B -V -ntp javadoc:javadoc
85+
86+
- name: Build site
87+
if: ${{ matrix.java != 17 }}
88+
run: mvn -e -B -V -ntp site site:stage
89+
90+
91+
# only run Publish if all builds completed
92+
publish:
93+
name: Publish
94+
needs: [build]
95+
runs-on: ubuntu-latest
96+
steps:
97+
98+
- name: Checkout code
99+
uses: actions/checkout@v6
100+
101+
- name: Extract version info
102+
run: |
103+
echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_OUTPUT;
104+
echo "java_version=$(mvn -q -Dexec.executable=echo -Dexec.args='${jdk.version}' --non-recursive exec:exec)" >> $GITHUB_OUTPUT;
105+
id: project
106+
107+
- name: Set up JDK ${{ steps.project.outputs.java_version }}
108+
if: contains(steps.project.outputs.version , '-SNAPSHOT')
109+
uses: actions/setup-java@v4
110+
with:
111+
distribution: 'adopt'
112+
java-version: ${{ steps.project.outputs.java_version }}
113+
cache: 'maven'
114+
115+
- name: Setup Maven settings.xml
116+
if: contains(steps.project.outputs.version , '-SNAPSHOT')
117+
uses: s4u/maven-settings-action@v4.0.0
118+
with:
119+
sonatypeSnapshots: true
120+
servers: |
121+
[{
122+
"id": "central-snapshot",
123+
"username": "${{ secrets.SONATYPE_ID }}",
124+
"password": "${{ secrets.SONATYPE_PASSWORD }}"
125+
}]
126+
127+
- name: Publish ${{ steps.project.outputs.version }}
128+
if: contains(steps.project.outputs.version , '-SNAPSHOT')
129+
run: mvn -P sign -P publish-snapshot -e -B -V -ntp -Dgpg.signer=bc deploy
130+
env:
131+
MAVEN_GPG_KEY: ${{ secrets.GPG_KEY }}
132+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }}
133+
134+
- name: ${{ steps.project.outputs.version }} Not Snapshot
135+
if: ${{ !contains(steps.project.outputs.version , '-SNAPSHOT') }}
136+
run: echo ${{ steps.project.outputs.version }} is not a snapshot -- not publishing"
137+
138+
# only run site if all builds completed
139+
site:
140+
name: Build Site
141+
needs: [ build ]
142+
runs-on: ubuntu-latest
143+
steps:
144+
145+
- name: Checkout code
146+
uses: actions/checkout@v6
147+
148+
- name: Set up JDK 20
149+
uses: actions/setup-java@v4
150+
with:
151+
distribution: 'adopt'
152+
java-version: 20
153+
cache: 'maven'
154+
155+
- name: Build site
156+
run: mvn -e -B -V -ntp site site:stage
157+
158+
- name: Upload artifact
159+
uses: actions/upload-pages-artifact@v3
160+
with:
161+
path: ./target/staging
162+
163+
# Deployment site
164+
deploy:
165+
name: Deploy site
166+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
167+
permissions:
168+
contents: read
169+
pages: write
170+
id-token: write
171+
environment:
172+
name: github-pages
173+
url: ${{ steps.deployment.outputs.page_url }}
174+
runs-on: ubuntu-latest
175+
needs: [site]
176+
steps:
177+
- name: Deploy to GitHub Pages
178+
id: deployment
179+
uses: actions/deploy-pages@v4

.github/workflows/PR_check.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
#
2+
# Copyright 2025 Aiven Oy and project contributors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing,
11+
# software distributed under the License is distributed on an
12+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
13+
# KIND, either express or implied. See the License for the
14+
# specific language governing permissions and limitations
15+
# under the License.
16+
#
17+
# SPDX-License-Identifier: Apache-2
18+
19+
# Workflow to check pull requests main branches
20+
# This checks the source in the state as if after the merge.
21+
name: Pull request checks
22+
on:
23+
workflow_dispatch:
24+
pull_request:
25+
branches: [ main ]
26+
27+
# Disallow concurrent runs for the same PR by cancelling in-progress runs
28+
# when new commits are pushed
29+
concurrency:
30+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
31+
cancel-in-progress: true
32+
33+
jobs:
34+
35+
# builds aiven-commons and all modules. Does not deploy.
36+
build:
37+
38+
strategy:
39+
matrix:
40+
java: [ 17, 20, 21, 25 ]
41+
fail-fast: false
42+
43+
name: Build
44+
runs-on: ubuntu-latest
45+
46+
steps:
47+
- name: Checkout code
48+
uses: actions/checkout@v6
49+
50+
- name: Configure artifact caching
51+
uses: actions/cache@v5
52+
with:
53+
path: ~/.m2/repository
54+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
55+
restore-keys: |
56+
${{ runner.os }}-maven-
57+
58+
59+
- name: Extract version info
60+
run: |
61+
echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_OUTPUT;
62+
echo "java_version=$(mvn -q -Dexec.executable=echo -Dexec.args='${jdk.version}' --non-recursive exec:exec)" >> $GITHUB_OUTPUT;
63+
id: project
64+
65+
- name: Set up JDK ${{ matrix.java }}
66+
uses: actions/setup-java@v5
67+
with:
68+
distribution: 'adopt'
69+
java-version: ${{ matrix.java }}
70+
cache: 'maven'
71+
72+
- name: Build with Maven
73+
run: mvn -e -B -V -ntp clean verify
74+
75+
# javadoc has issues with java 17
76+
- name: Generate javadoc
77+
if: ${{ matrix.java != 17 }}
78+
run: mvn -e -B -V -ntp javadoc:javadoc
79+
80+
- name: Build site
81+
if: ${{ matrix.java != 17 }}
82+
run: mvn -e -B -V -ntp site site:stage
83+
84+
- name: "Upload build failure reports"
85+
uses: actions/upload-artifact@v4
86+
if: failure()
87+
with:
88+
name: unit-test-results-${{ matrix.java }}-JDK
89+
path: |
90+
**/target/*-reports/**
91+
retention-days: 1
92+
93+

0 commit comments

Comments
 (0)