Skip to content

Commit 2dbd575

Browse files
committed
Enable dependabot for most dependencies
The idea is that we'd merge updates in the "build-dependencies" group as-is, without a Jira issue. **We would still have to adjust/re-create other update PRs** (such as Jandex) to assign them a Jira issue. We could consider limiting the dependencies covered by dependabot, but I find that grouping, at least, allows a fairly manageable rate of dependabot PRs. Runtime dependency updates should be more rare anyway, as their number is limited and they're generally less active (e.g. Jakarta Persistence doesn't release a micro every week). The most important ones are the runtime ones, e.g. bytebuddy, so we could consider ignoring/limiting build dependency updates if necessary.
1 parent 106200b commit 2dbd575

File tree

3 files changed

+138
-8
lines changed

3 files changed

+138
-8
lines changed

.github/dependabot.yml

Lines changed: 126 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@ registries:
66
username: dummy # Required by dependabot
77
password: dummy # Required by dependabot
88
updates:
9-
- package-ecosystem: "gradle"
10-
directory: "/"
11-
allow:
12-
- dependency-name: "com.gradle*"
13-
registries:
14-
- gradle-plugin-portal
15-
schedule:
16-
interval: "weekly"
179
- package-ecosystem: github-actions
1810
directory: "/"
1911
schedule:
@@ -25,3 +17,129 @@ updates:
2517
allow:
2618
- dependency-name: "actions/*"
2719
- dependency-name: "redhat-actions/*"
20+
- package-ecosystem: "gradle"
21+
directory: "/"
22+
registries:
23+
- gradle-plugin-portal
24+
schedule:
25+
interval: "weekly"
26+
day: "wednesday"
27+
open-pull-requests-limit: 20
28+
groups:
29+
# These are used in tooling we publish (Gradle, Ant, Maven plugins)
30+
# and thus must be treated as runtime dependencies,
31+
# which cannot be included in the build-dependencies group below.
32+
tooling-dependencies:
33+
update-types: ["minor", "patch"]
34+
patterns:
35+
# Note: Gradle tooling dependencies seem to be tied to the version of Gradle we use for building.
36+
- "org.apache.ant*"
37+
- "org.apache.maven:maven-plugin-api"
38+
- "org.apache.maven:maven-project"
39+
- "org.apache.maven.shared:file-management"
40+
- "org.apache.maven.plugin-tools:maven-plugin-annotations"
41+
# This group combines all build-only dependencies. Published artifacts do not depend on them.
42+
# Grouping such dependencies will make Dependabot create PRs with a branch name
43+
# following the pattern (`dependabot/maven/build-dependencies-.*`)
44+
# and with a title like `Bump the build-dependencies group with 8 updates` that we can easily
45+
# use for Hibernate Bot rules.
46+
build-dependencies:
47+
patterns:
48+
# Gradle plugins:
49+
- "com.gradle*"
50+
- "org.moditect*"
51+
- "de.thetaphi*"
52+
- "org.gradlex*"
53+
- "org.hibernate.build*"
54+
- "org.hibernate.orm.build*"
55+
- "org.hibernate.orm.database-service*"
56+
- "org.hibernate.orm.antlr*"
57+
- "io.github.gradle-nexus*"
58+
- "biz.aQute.bnd*"
59+
- "org.checkerframework*"
60+
- "org.jetbrains.gradle*"
61+
- "com.dorongold*"
62+
- "org.asciidoctor*"
63+
- "com.diffplug.spotless*"
64+
# Local build plugin dependencies:
65+
- "org.apache.maven*"
66+
- "org.apache.httpcomponents*"
67+
# DB drivers:
68+
- "com.h2database:h2"
69+
- "org.orbisgis:h2gis"
70+
- "org.hsqldb:hsqldb"
71+
- "org.apache.derby*"
72+
- "org.postgresql:*"
73+
- "com.mysql:mysql-connector-j"
74+
- "org.mariadb.jdbc:mariadb-java-client"
75+
- "com.oracle.database.*"
76+
- "com.microsoft.sqlserver:mssql-jdbc"
77+
- "com.ibm.db2:jcc"
78+
- "com.sap.cloud.db.jdbc:ngdbc"
79+
- "net.sourceforge.jtds:jtds"
80+
- "com.ibm.informix:jdbc"
81+
- "org.firebirdsql.jdbc:jaybird"
82+
- "com.altibase:altibase-jdbc"
83+
# Other test dependencies
84+
- "org.apache.groovy:groovy-jsr223" # used for scripting maven plugin
85+
- "org.apache.commons:commons-lang3" # used in hibernate-search-util-common tests
86+
- "org.apache.commons:commons-math3" # used to solve dependency convergence for Wiremock
87+
- "org.openjdk.jmh:*" # performance testing dependency
88+
- "com.google.guava:guava" # Guava is used in our test utils
89+
- "org.asciidoctor:*" # Asciidoctor is used for rendering the documentation
90+
- "org.jboss.marshalling:jboss-marshalling" # JBeret IT dependency
91+
- "org.wildfly.security:wildfly-security-manager" # JBeret IT dependency
92+
- "org.springframework.boot:*" # Spring is only for ITs
93+
- "io.agroal:agroal-spring-boot-starter" # part of Spring dependencies, is only for ITs
94+
- "dev.snowdrop:narayana-spring-boot-starter" # part of Spring dependencies, is only for ITs
95+
- "org.mockito:*"
96+
- "org.hamcrest:*"
97+
- "org.apache.logging.log4j:*"
98+
- "org.assertj:*"
99+
- "org.jsoup:*"
100+
- "org.junit*"
101+
- "org.jboss.weld.se:*"
102+
- "org.jboss.narayana.*:*"
103+
- "org.wildfly.transaction:*"
104+
- "org.jboss:jboss-transaction-spi"
105+
- "org.jboss.shrinkwrap*"
106+
- "org.jboss.byteman*"
107+
hibernate:
108+
patterns:
109+
- "org.hibernate*"
110+
jakarta:
111+
patterns:
112+
- "jakarta.*"
113+
- "org.glassfish*"
114+
- "org.eclipse:yasson"
115+
ignore:
116+
# Avoid non-patch updates for complex dependencies and their implementation, even if we only use them for tests.
117+
- dependency-name: "org.hibernate*"
118+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
119+
- dependency-name: "jakarta.*"
120+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
121+
- dependency-name: "org.jboss.narayana*"
122+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
123+
- dependency-name: "org.jboss.weld*"
124+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
125+
- dependency-name: "org.wildfly*"
126+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
127+
- dependency-name: "org.glassfish*"
128+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
129+
- dependency-name: "org.eclipse:yasson"
130+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
131+
- dependency-name: "org.apache.maven*"
132+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
133+
- dependency-name: "org.apache.ant*"
134+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
135+
# Avoid non-patch updates for JUnit, because it is exposed in hibernate-testing,
136+
# which contains @BytecodeEnhanced, which is very sensitive to internal changes in JUnit.
137+
- dependency-name: "org.junit*"
138+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
139+
# Sticking to SLF4J 1.x for now since later versions require upgrading providers
140+
# (Log4j, ... see https://www.slf4j.org/faq.html#changesInVersion200),
141+
# and also because we only need this dependency for Maven,
142+
# which is currently still on SLF4J 1.x
143+
# (see https://central.sonatype.com/artifact/org.apache.maven/maven-embedder/3.9.9/dependencies)
144+
- dependency-name: "org.slf4j:*"
145+
update-types: ["version-update:semver-major"]

.github/hibernate-github-bot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
jira:
33
projectKey: "HHH"
44
insertLinksInPullRequests: true
5+
ignore:
6+
# See the `build-dependencies` group in Dependabot's configuration file
7+
- user: dependabot[bot]
8+
titlePattern: "Bump.*the (build-dependencies|workflow-actions) group.*+"
59
ignoreFiles:
610
# Git
711
- ".git*"

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@ name: GH Actions CI
33
on:
44
push:
55
branches:
6+
# Pattern order matters: the last matching inclusion/exclusion wins
67
- 'main'
8+
# We don't want to run CI on branches for dependabot, just on the PR.
9+
- '!dependabot/**'
710
pull_request:
811
branches:
912
- 'main'
13+
# Ignore dependabot PRs that are not just about build dependencies or workflows;
14+
# we'll reject such PRs and send one ourselves.
15+
- '!dependabot/**'
16+
- 'dependabot/maven/build-dependencies-**'
17+
- 'dependabot/github_actions/workflow-actions-**'
1018

1119
permissions: { } # none
1220

0 commit comments

Comments
 (0)