Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
c94016d
Bump org.assertj:assertj-core from 3.24.2 to 3.25.1
dependabot[bot] Jan 8, 2024
7d63695
Bump quarkus.version from 3.6.3 to 3.6.4
dependabot[bot] Jan 8, 2024
a120ff8
Bump org.apache.maven.plugins:maven-compiler-plugin
dependabot[bot] Jan 8, 2024
ba87ede
Bump surefire-plugin.version from 3.2.3 to 3.2.5
dependabot[bot] Jan 15, 2024
d8edbaf
Bump quarkus.version from 3.6.4 to 3.6.5
dependabot[bot] Jan 15, 2024
16f07e2
dependabot: Move Maven plugins to a dedicated group
yrodiere Jan 26, 2024
75d0e25
dependabot: Exclude Quarkus from maven-plugins group
yrodiere Jan 26, 2024
1634e97
Bump org.assertj:assertj-core from 3.25.1 to 3.25.2
dependabot[bot] Jan 26, 2024
b5cbf06
Bump quarkus-github-app.version from 2.1.1 to 2.2.0
dependabot[bot] Jan 29, 2024
30c2393
Bump quarkus.version from 3.6.5 to 3.7.0
dependabot[bot] Jan 29, 2024
5268e71
dependabot: group Quarkus updates and limit assertj bumps
yrodiere Feb 5, 2024
4d545ec
Bump the quarkus group with 2 updates
dependabot[bot] Feb 5, 2024
132fd42
Bump the quarkus group with 2 updates
dependabot[bot] Feb 12, 2024
b771841
Bump the quarkus group with 2 updates
dependabot[bot] Feb 19, 2024
e609f3a
Bump the quarkus group with 4 updates
dependabot[bot] Feb 26, 2024
e0ca8a0
Bump the quarkus group with 4 updates
dependabot[bot] Mar 4, 2024
72d6c2f
Bump the quarkus group with 4 updates
dependabot[bot] Mar 11, 2024
4128ad2
Small improvements to automatic PR issue link editing
mbellade Mar 8, 2024
78cf816
Add new configuration that limits the issue auto-link feature
mbellade Mar 12, 2024
cce2376
Bump the quarkus group with 4 updates
dependabot[bot] Mar 18, 2024
e7df89b
Clarify that existing checks are exclusively about pull requests
yrodiere Mar 20, 2024
bf3488a
Attach Develocity build scans to GitHub Checks
yrodiere Mar 20, 2024
ad171a3
Use Maven 3.9 in CI builds, make Maven Wrapper versions explicit
yrodiere Mar 21, 2024
f36ad30
Center some columns in Develocity build scan extractions
yrodiere Mar 21, 2024
4432ed9
Fix crash when processing faulty build scans (missing data)
yrodiere Mar 21, 2024
13cef06
Allow partial extraction of build scans even if some error out
yrodiere Mar 21, 2024
2764c37
Direct link to failure in Develocity build scan reports
yrodiere Mar 25, 2024
e5bc9f4
Bump the maven-plugins group with 1 update
dependabot[bot] Mar 25, 2024
ddf5c30
Bump the quarkus group with 4 updates
dependabot[bot] Mar 25, 2024
9045f2a
Use :white_check_mark: instead of :heavy_check_mark: in build scan re…
yrodiere Mar 25, 2024
3f80820
Bump the quarkus group with 2 updates
dependabot[bot] Apr 1, 2024
4be8ae9
Bump the quarkus group with 4 updates
dependabot[bot] Apr 8, 2024
7e3650e
Bump the quarkus group with 2 updates
dependabot[bot] Apr 15, 2024
1112453
Bump the quarkus group with 2 updates
dependabot[bot] Apr 22, 2024
33ecf39
Bump org.apache.maven.plugins:maven-wrapper-plugin
dependabot[bot] Apr 22, 2024
41b9762
Update relocated dependency
yrodiere Apr 26, 2024
1aaee4b
Move to Qute for report rendering
yrodiere Apr 25, 2024
c892310
Remove some unnecessary logging
yrodiere Apr 25, 2024
6510470
Configurable tag columns for build scan reports
yrodiere Apr 25, 2024
d54013b
More compact format for build scan reports
yrodiere Apr 25, 2024
632779e
Even more compact format for build scan reports
yrodiere Apr 26, 2024
ff23187
Use Gradle-inclusive column names
yrodiere Apr 26, 2024
94d402c
Handle merge commits in develocity build scan retrieval
yrodiere Apr 26, 2024
ba22e46
Bump org.apache.maven.plugins:maven-wrapper-plugin
dependabot[bot] Apr 29, 2024
716afd5
Bump the quarkus group with 2 updates
dependabot[bot] Apr 29, 2024
f436e3f
Fix incorrect detection of test failures
yrodiere Apr 29, 2024
86fa65f
Bump io.quarkiverse.openapi.generator:quarkus-openapi-generator
dependabot[bot] May 6, 2024
05c8fca
Bump the quarkus group with 2 updates
dependabot[bot] May 20, 2024
261a03d
Bump org.apache.maven.plugins:maven-wrapper-plugin
dependabot[bot] May 27, 2024
1999d74
Bump the quarkus group with 2 updates
dependabot[bot] May 27, 2024
4911514
Bump org.assertj:assertj-core from 3.25.2 to 3.26.0
dependabot[bot] May 27, 2024
d041d2e
Bump the quarkus group with 2 updates
dependabot[bot] Jun 10, 2024
827d798
Bump the quarkus group across 1 directory with 4 updates
dependabot[bot] Jun 24, 2024
738079a
Develocity build scans: link directly to failing tests when there are…
yrodiere Jun 25, 2024
edcb8c1
Bump the maven-plugins group with 2 updates
dependabot[bot] Jun 17, 2024
e3694ca
Fix syntax of links to failed test reports
yrodiere Jul 1, 2024
cb13b93
Bump the quarkus group with 2 updates
dependabot[bot] Jul 8, 2024
e76af9f
Bump the maven-plugins group with 2 updates
dependabot[bot] Jul 15, 2024
b33937d
Bump the quarkus group with 2 updates
dependabot[bot] Jul 15, 2024
0a6f543
Bump the quarkus group with 2 updates
dependabot[bot] Jul 22, 2024
7dffb2d
Bump the quarkus group with 2 updates
dependabot[bot] Jul 29, 2024
27c1e32
Bump the quarkus group with 3 updates
dependabot[bot] Aug 12, 2024
87cb547
Bump the maven-plugins group with 2 updates
dependabot[bot] Aug 19, 2024
718b372
Bump io.quarkiverse.openapi.generator:quarkus-openapi-generator
dependabot[bot] Aug 19, 2024
15a2de3
Bump the quarkus group with 4 updates
dependabot[bot] Aug 26, 2024
04578d4
Bump the maven-plugins group with 2 updates
dependabot[bot] Sep 2, 2024
42ff838
Bump the quarkus group with 2 updates
dependabot[bot] Sep 2, 2024
eb64574
Bump the quarkus group with 2 updates
dependabot[bot] Sep 9, 2024
09f8f83
Bump the quarkus group with 2 updates
dependabot[bot] Sep 16, 2024
47bb600
Bump the quarkus group with 2 updates
dependabot[bot] Sep 23, 2024
cf767d3
Bump the quarkus group with 2 updates
dependabot[bot] Sep 30, 2024
fbfe07a
Bump the maven-plugins group with 2 updates
dependabot[bot] Oct 7, 2024
d22edab
Sort build scans by job run
yrodiere Oct 25, 2024
8deab47
Bump the quarkus group with 2 updates
dependabot[bot] Oct 28, 2024
1103078
Add links to the web search in Develocity reports
yrodiere Oct 28, 2024
8f2c68b
Bump to JDK 21
marko-bekhta Oct 28, 2024
c31b9a9
Use a GH action to deploy to an OpenShift cluster
marko-bekhta Oct 29, 2024
e7f325a
Use a GH action to build PRs
marko-bekhta Oct 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,21 @@ updates:
directory: "/"
schedule:
interval: weekly
groups:
maven-plugins:
patterns:
- "*maven*plugin*"
- "org.apache.maven*:*"
exclude-patterns:
- "io.quarkus*"
quarkus:
patterns:
- "io.quarkus:*"
- "io.quarkus.*:*"
- "io.quarkiverse:*"
- "io.quarkiverse.*:*"
ignore:
# Releases too often, it's annoying
- dependency-name: "org.assertj:*"
update-types: ["version-update:semver-patch"]

29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build pull request

on:
pull_request:
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
- '.all-contributorsrc'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21

- name: Build
run: ./mvnw -B clean verify
91 changes: 91 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Deploy

on:
push:
branches:
- "main"
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
- '.all-contributorsrc'

concurrency:
group: deployment
cancel-in-progress: false

jobs:
deploy:

if: github.repository == 'hibernate/hibernate-github-bot'

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21

- name: Build
run: ./mvnw -B clean verify

- name: Set up Helm
uses: azure/[email protected]
with:
version: 'v3.13.3'

- name: Log in to OpenShift
uses: redhat-actions/oc-login@v1
with:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER_INFRA_PROD }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN_INFRA_PROD }}
namespace: ${{ secrets.OPENSHIFT_NAMESPACE_INFRA_PROD }}

- name: Create ImageStream
run: |
oc create imagestream hibernate-github-bot || true
# https://docs.openshift.com/container-platform/4.14/openshift_images/using-imagestreams-with-kube-resources.html
oc set image-lookup hibernate-github-bot

- name: Retrieve OpenShift Container Registry URL
id: oc-registry
run: |
echo -n "OC_REGISTRY_URL=" >> "$GITHUB_OUTPUT"
oc get imagestream -o json | jq -r '.items[0].status.publicDockerImageRepository' | awk -F"[/]" '{print $1}' >> "$GITHUB_OUTPUT"

- name: Log in to OpenShift Container Registry
uses: docker/login-action@v3
with:
registry: ${{ steps.oc-registry.outputs.OC_REGISTRY_URL }}
username: ignored
password: ${{ secrets.OPENSHIFT_TOKEN_INFRA_PROD }}
# Helm in particular needs semantic versions
# See https://github.com/helm/helm/issues/9342#issuecomment-775269042
# See the parts about pre-release versions in https://semver.org/#semantic-versioning-specification-semver
# Ideally we should use a "+" before the SHA, but that won't work with Quarkus
# See https://github.com/quarkusio/quarkus/blob/da1a782e04b01b2e165d65474163050d497340c1/extensions/container-image/spi/src/main/java/io/quarkus/container/spi/ImageReference.java#L60
- name: Generate app version
id: app-version
run: |
echo "VALUE=1.0.0-$(date -u '+%Y%m%d%H%M%S')-${{ github.sha }}" >> $GITHUB_OUTPUT

- name: Build and push app container image
run: |
./mvnw clean package -DskipTests \
-Drevision="${{ steps.app-version.outputs.value }}" \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=true \
-Dquarkus.container-image.registry="$(oc get imagestream -o json | jq -r '.items[0].status.publicDockerImageRepository' | awk -F"[/]" '{print $1}')" \
-Dquarkus.container-image.group="$(oc project --short)" \
-Dquarkus.container-image.additional-tags=latest

- name: Deploy Helm charts
run: |
helm upgrade --install hibernate-github-bot ./target/helm/openshift/hibernate-github-bot
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
67 changes: 0 additions & 67 deletions Jenkinsfile

This file was deleted.

45 changes: 42 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Specifically, most of the GitHub-related features in this bot are powered by

## Features

### Pull request checking

This bot checks various contribution rules on pull requests submitted to Hibernate projects on GitHub,
and notifies the pull request authors of any change they need to work on.

Expand All @@ -21,9 +23,16 @@ This includes:
* Proper formatting of commits: every commit message must start with the key of a JIRA ticket.
* Etc.

The bot can also be configured to automatically add links to JIRA issues in PR descriptions. When this is enabled
### Jira link insertion

Optionally, the bot can be configured to automatically add links to JIRA issues in PR descriptions. When this is enabled
links to JIRA tickets will be appended at the bottom of the PR body.

### Develocity build scan extraction

Optionally, the bot can be configured to automatically create a GitHub check listing Develocity build scans
for every commit that has completed checks related to CI (GitHub Actions or Jenkins).

## Configuration

### Enabling the bot in a new repository
Expand All @@ -33,15 +42,16 @@ You will need admin rights in the Hibernate organization.
Go to [the installed application settings](https://github.com/organizations/hibernate/settings/installations/15390286)
and add your repository under "Repository access".

If you wish to enable the JIRA-related features as well,
If you wish to enable the JIRA-related or Develocity-related features as well,
create the file `.github/hibernate-github-bot.yml` in default branch of your repository,
with the following content:

```yaml
---
jira:
projectKey: "HSEARCH" # Change to whatever your project key is
insertLinksInPullRequests: true # This is optional and enables automatically adding issue links to PR descriptions
insertLinksInPullRequests: true # This is optional and enables automatically adding links to Jira issues found in a PR's commits to its description
linkIssuesLimit: 3 # This is optional and allows disabling automatic issue links when more than the specified number of keys are found in a PR's commits (defaults to 3)
# To skip JIRA-related checks (pull request title/body includes JIRA issue keys/links etc.),
# a list of ignore rules can be configured:
ignore:
Expand All @@ -61,6 +71,35 @@ jira:
# Ignore all paths matching a given pattern
- "*/Jenkinsfile"
- "*.Jenkinsfile"
develocity:
buildScan:
# To have the bot create a GitHub check listing Develocity build scans
# for every commit that has completed checks related to CI (GitHub Actions or Jenkins)
addCheck: true
# To group tags in a separate column and/or alter/remove some tags,
# a list of column rules can be configured:
tags:
- column: "OS"
pattern: "Linux"
- column: "OS" # Multiple rules can target the same column
pattern: "Windows.*"
replacement: "Windows"
- column: "Java"
pattern: "jdk-(.*)"
replacement: "$1"
- column: "Backend"
pattern: "elasticsearch-(.*)"
replacement: "es-$1" # Replacement can refer to capture groups
- column: "Backend"
pattern: "(.*-)?opensearch-(.*)"
replacement: "$1os-$2"
- column: "Backend"
pattern: "lucene"
- column: "DB"
pattern: "h2|postgres|postgres(ql)?|mysql|mssql|derby|tidb|cockroach(db)?|oracle.*|db2"
replacement: "$0"
- pattern: "hibernate.search|elasticsearch|opensearch|main|\\d+.\\d+|PR-\\d+"
replacement: "" # Just remove these tags
```

### Altering the infrastructure
Expand Down
40 changes: 31 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,23 @@

<properties>
<revision>999-SNAPSHOT</revision>
<compiler-plugin.version>3.11.0</compiler-plugin.version>
<maven.min.version>3.9.6</maven.min.version>
<maven-wrapper-plugin.version>3.3.2</maven-wrapper-plugin.version>
<compiler-plugin.version>3.13.0</compiler-plugin.version>
<maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus-github-app.version>2.1.1</quarkus-github-app.version>
<quarkus-github-app.version>2.7.0</quarkus-github-app.version>
<quarkus-openapi-generator.version>2.4.7</quarkus-openapi-generator.version>
<!-- Using a single property for both plugin and platform, so that GitHub's Dependabot doesn't get confused -->
<quarkus.version>3.6.3</quarkus.version>
<quarkus.version>3.16.0</quarkus.version>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<glob.version>0.9.0</glob.version>
<surefire-plugin.version>3.2.3</surefire-plugin.version>
<assertj.version>3.24.2</assertj.version>
<surefire-plugin.version>3.5.1</surefire-plugin.version>
<assertj.version>3.26.0</assertj.version>
</properties>
<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -87,10 +90,23 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-health</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-qute</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-cache</artifactId>
</dependency>
<dependency>
<groupId>io.quarkiverse.openapi.generator</groupId>
<artifactId>quarkus-openapi-generator</artifactId>
<version>${quarkus-openapi-generator.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest-client-jackson</artifactId>
</dependency>
<dependency>
<groupId>com.hrakaroo</groupId>
<artifactId>glob</artifactId>
Expand All @@ -110,13 +126,19 @@
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-wrapper-plugin</artifactId>
<version>${maven-wrapper-plugin.version}</version>
<configuration>
<mavenVersion>${maven.min.version}</mavenVersion>
</configuration>
</plugin>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.version}</version>
<extensions>true</extensions>
<configuration>
</configuration>
<executions>
<execution>
<goals>
Expand Down
Loading