Skip to content

Commit 3fa896b

Browse files
committed
Add notes on the release process
1 parent ea372e1 commit 3fa896b

File tree

1 file changed

+130
-0
lines changed

1 file changed

+130
-0
lines changed

MAINTAINERS.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
Guide for maintainers of Hibernate Validator
2+
====
3+
4+
This guide is intended for maintainers of Hibernate Validator,
5+
i.e. anybody with direct push access to the git repository.
6+
7+
## <a id="releasing"></a> Releasing
8+
9+
### Preparing the release
10+
11+
In any case:
12+
13+
* Check that everything has been pushed to the upstream repository.
14+
* Check that the CI jobs for the branch you want to release are green:
15+
* Check that the [main build CI job](https://ci.hibernate.org/view/Validator/job/hibernate-validator/).
16+
* Check that the [nightly CI job](https://ci.hibernate.org/view/Validator/job/hibernate-validator-nightly/).
17+
In particular to make sure that the build is reproducible.
18+
* Check Jira:
19+
* Check there are no outstanding issues assigned to the release.
20+
* Check there are no resolved/closed issues in the current `*-backlog`/`*-next` "version"s;
21+
if there are, you might want to assign them to your release.
22+
23+
**If it is a new major or minor release**:
24+
25+
* Start a new draft PR for a migration guide modifying
26+
the [corresponding page on hibernate.org](https://github.com/hibernate/hibernate.org/blob/production/validator/documentation/migration-guide.adoc).
27+
28+
**If it's a `.CR` or `.Final` release**:
29+
30+
* Check that the migration guide is up to date.
31+
In particular, check the git history for API/SPI changes
32+
and document them in the migration guide.
33+
34+
If you **added a new Maven module** that should be included in the distribution,
35+
**check that it has been included in the distribution** (javadoc and ZIP distribution):
36+
37+
* `mvn clean install -Pdocumentation-pdf,dist -DskipTests`
38+
* Check the distribution package as built by Maven (`distribution/target/hibernate-validator-<version>-dist`).
39+
In particular, check the jar files in the subdirectories:
40+
* `lib/required`
41+
* `lib/optional`
42+
* `lib/provided`
43+
44+
They should contain the appropriate dependencies, without duplicates.
45+
The creation of these directories is driven by the assembly plugin (`distribution/src/main/assembly/dist.xml`)
46+
which is very specific and might break with the inclusion of new dependencies.
47+
48+
* If there were **any new plugins added** in the current iteration, check that there are no unwanted files
49+
included in the distribution package.
50+
51+
### Performing the release
52+
53+
Once you trigger the CI job, it automatically pushes artifacts to the
54+
[OSSRH repository manager](https://oss.sonatype.org/#stagingRepositories),
55+
the distribution to [SourceForge](https://sourceforge.net/projects/hibernate/files/hibernate-validator/)
56+
and the documentation to [docs.jboss.org](https://docs.jboss.org/hibernate/validator/).
57+
58+
* Transfer the released issues in JIRA to the "Closed state":
59+
* Go to [the list of releases](https://hibernate.atlassian.net/projects/HV?selectedItem=com.atlassian.jira.jira-projects-plugin%3Arelease-page)
60+
* Select the version to release.
61+
* Click the link "View in Issue Navigator" on the top right corner of the list.
62+
* Click the button with three dots on the top right corner of the screen and click "Bulk change all XX issues".
63+
* Use the "Transition" action to transition your issues from "Resolved" to "Closed".
64+
* Release the version on JIRA:
65+
* Go to [the list of releases](https://hibernate.atlassian.net/projects/HV?selectedItem=com.atlassian.jira.jira-projects-plugin%3Arelease-page)
66+
* Click "Release" next to the version to release.
67+
* Do *not* update the repository (in particular changelog.txt and README.md),
68+
the release job does it for you.
69+
* Trigger the release on CI:
70+
* Go to CI, to [the "hibernate-validator-release" CI job](https://ci.hibernate.org/job/hibernate-validator-release/).
71+
* Click the "run" button (the green triangle on top of a clock, to the right) next to the branch you want to release.
72+
* **Be careful** when filling the form with the build parameters.
73+
* Note that for new branches where the job has never run, the first run will not ask for parameters and thus will fail:
74+
that's expected, just run it again.
75+
* Release the artifacts on the [OSSRH repository manager](https://oss.sonatype.org/#stagingRepositories).
76+
* Log into Nexus. The credentials can be found on Bitwarden; ask a teammate if you don't have access.
77+
* Click "staging repositories" to the left.
78+
* Examine your staging repository: check that all expected artifacts are there.
79+
* If necessary (that's very rare), test the release in the staging repository.
80+
You can drop the staging repo if there is a problem,
81+
but you'll need to revert the commits pushed during the release.
82+
* If everything is ok, select the staging repository and click the "Release" button.
83+
84+
### Announcing the release
85+
86+
* Update [hibernate.org](https://github.com/hibernate/hibernate.org):
87+
* If it is a new major or minor release, add a `_data/projects/validator/releases/series.yml` file
88+
and a `validator/releases/<version>/index.adoc` file.
89+
* Add a new YAML release file to `_data/projects/validator/releases`.
90+
* Depending on which series you want to have displayed,
91+
make sure to adjust the `end-of-life`/`displayed` flag of the `series.yml` file of the old series.
92+
* Push to the production branch.
93+
* Blog about release on [in.relation.to](https://github.com/hibernate/in.relation.to).
94+
Make sure to use the tags "Hibernate Validator" and "Releases" for the blog entry.
95+
* Send an email to hibernate-announce and CC hibernate-dev.
96+
* Tweet about the release via the @Hibernate account.
97+
98+
### Updating depending projects
99+
100+
If you just released the latest stable, you will need to update other projects:
101+
102+
* Approve and merge automatic updates that dependabot will send (it might take ~24h):
103+
* In the [test case templates](https://github.com/hibernate/hibernate-test-case-templates/tree/main/validator).
104+
* In the [demos](https://github.com/hibernate/hibernate-demos/tree/main/hibernate-validator).
105+
* **If it's a `.Final` release**, upgrade the Hibernate Validator dependency manually:
106+
* In the [Quarkus BOM](https://github.com/quarkusio/quarkus/blob/main/bom/application/pom.xml).
107+
* In the [WildFly root POM](https://github.com/wildfly/wildfly/blob/main/pom.xml).
108+
* In any other relevant project.
109+
110+
### Updating Hibernate Validator
111+
112+
In any case:
113+
114+
* Make sure to keep the `previous.stable` property in the POM up-to-date
115+
on all actively developed branches.
116+
The property must point to the latest micro of the previous minor.
117+
E.g. let's say you release 5.6.5 while actively working on 5.7,
118+
then the development branch for 5.7 must have its `previous.stable` property set to 5.6.5.
119+
120+
**If it is a new major or minor release**:
121+
122+
* Reset the migration guide on the `main` branch if you forgot about it when preparing the release.
123+
* Create a maintenance branch for the previous series, if not already done:
124+
* `git branch <x.(y-1)> <last relevant commit on main>`
125+
* Update the version on the new branch if necessary:
126+
* `mvn versions:set -DnewVersion=<x.(y-1).z>-SNAPSHOT`
127+
* `git add -A`, `commit`
128+
* `git push upstream` the new branch
129+
* Activate GitHub's "branch protection" features on the newly created maintenance branch:
130+
https://github.com/hibernate/hibernate-validator/settings/branches/.

0 commit comments

Comments
 (0)