Skip to content

Commit be56381

Browse files
arteamjplock
authored andcommittedJul 27, 2016
Document the Dropwizard release process (dropwizard#1592)
* Document the Dropwizard release process Add a simple document, which describes the technical aspects of making a release of Dropwizard. This information is mostly exist in the form emails between Dropwizard commiters and personal experience, so it's quite easy to a maintainer to forget some steps during a release and make a mistake. It would be great, if we wrote it down in the repository and make accessible to the community. This should make Dropwizard a more transparent project and allow to improve our release process. [ciskip] Use script * Add a script for prepating Dropwizard docs This script builds the project documentation, copies it to `gh-pages` branch and commits it. This allows in some regard to automate the process of preparing documentation for publication to the site. [ci skip]
1 parent 3f1987d commit be56381

File tree

2 files changed

+105
-0
lines changed

2 files changed

+105
-0
lines changed
 

‎RELEASES.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Dropwizard Release Process
2+
3+
This document describes the technical aspects of the Dropwizard release process.
4+
5+
## Who is responsible for a release?
6+
7+
A release can be performed by any member of the Dropwizard project with the commit rights to the repository.
8+
The person responsible for the release MUST seek an approval for it in the `dropwizard-committers`
9+
mailing list beforehand.
10+
11+
## Prerequisites for a new maintainer
12+
13+
* Register an account in the Sonatype's [Jira](https://issues.sonatype.org)
14+
* Create a Jira ticket asking to obtain the right permissions to push artifacts belonging
15+
to the `io.dropwizard` group.
16+
* Write an email to @joschi or @carlo-rtr, so they can approve the request in the Jira ticket.
17+
* Generate a gpg key with an email linked to your Github/Sonatype account
18+
`gpg --gen-key`
19+
* Distribute the key
20+
`gpg --keyserver hkp://pgp.mit.edu --send-keys XXXX` # XXXX - the code of the generated key
21+
22+
## Performing a release
23+
24+
* Edit `docs/source/about/release-notes.rst` and set the release date;
25+
* Edit `docs/source/about/docs-index.rst` and set the link to the release docs;
26+
* Run `mvn release:prepare` in the master branch;
27+
* Observe that all tests passed, there is no build errors and the corresponding git tag was created;
28+
* Run `mvn release:perform -Dgoals=deploy`;
29+
* Login at Sonatype's OSS Nexus `https://oss.sonatype.org`;
30+
* Click "Staging repositories";
31+
* Find the `io.dropwizard` group, and click on the close button on the top bar;
32+
* Wait while the Nexus server will perform some checks that artifacts were uploaded correctly;
33+
* Click the refresh button;
34+
* Select `io.dropwizard` again, and hit the release button on the top bar;
35+
* Normally the release will be available in the Maven Central repository in 3-4 hours (this may vary depending on the
36+
indexing process).
37+
* Publish the documentation. Run the script `prepare_docs.sh` and verify it completed successfully.
38+
Push the changes to the remote `gh-pages` branch.
39+
40+
## Making an announcement
41+
42+
After the release has been uploaded to the repository and the documentation has been updated, a release announcement
43+
should be published in the `dropwizard-user` and `dropwizard-dev` mailing lists. There is no formal structure for
44+
the announcement, but generally it should contain a short description of the release, the artifact coordinates in the
45+
Maven Central, a link to documentation, a link to the release notes, and a link to the bug tracker.

‎prepare_docs.sh

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Builds the documentation of the Dropwizard project for the specified
4+
# release, copies and commits it to the local gh-pages branch.
5+
#
6+
# Usage: ./prepare_docs.sh v1.0.1
7+
#
8+
9+
set -e
10+
11+
[[ "$#" -eq 0 ]] && { echo "No release branch is specified"; exit 1; }
12+
13+
release_branch="$1"
14+
release_number="${release_branch:1}"
15+
16+
echo -e "\nGenerating Dropwizard documentation"
17+
echo "Release branch: $release_branch"
18+
echo "Release number: $release_number"
19+
20+
echo -e "\n-------------------------------"
21+
echo "Moving to $release_branch branch"
22+
echo "-------------------------------"
23+
24+
git checkout "$release_branch"
25+
26+
echo -e "\n-------------------------------"
27+
echo "Generating documentation"
28+
echo -e "-------------------------------\n"
29+
30+
mvn clean site
31+
32+
echo -e "\n-------------------------------"
33+
echo "Staging documentation"
34+
echo "-------------------------------"
35+
mvn site:stage
36+
37+
echo -e "\n-------------------------------"
38+
echo "Moving to the gh-pages branch"
39+
echo -e "-------------------------------\n"
40+
git checkout gh-pages
41+
42+
echo -e "\n-------------------------------"
43+
echo "Creating a directory for documentation"
44+
echo -e "-------------------------------\n"
45+
mkdir "$release_number"
46+
47+
echo -e "\n-------------------------------"
48+
echo "Copy documentation"
49+
echo -e "-------------------------------\n"
50+
cp -r target/staging/* "${release_number}"/
51+
52+
echo -e "\n-------------------------------"
53+
echo "Add and commit changes to the repository"
54+
echo -e "-------------------------------\n"
55+
git add .
56+
git commit -m "Add docs for Dropwizard $release_number"
57+
58+
echo -e "\nDone!"
59+
echo "Please review changes and push them with if they look good"
60+
exit $?

0 commit comments

Comments
 (0)