Skip to content

Commit ea153be

Browse files
committed
Improve release process doc
1 parent cf0f490 commit ea153be

File tree

1 file changed

+31
-17
lines changed

1 file changed

+31
-17
lines changed

contribute/release-process.md

+31-17
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ Sometimes some PRs cannot be cherry-picked cleanly, you might need to create a s
2525

2626
For PRs that are still open, you can choose to delay them to the next release or ping others to review so that they can be merged.
2727

28-
To verify the release branch is not broken, you should trigger a Pulsar CI builds for the [pulsar-ci.yaml](https://github.com/apache/pulsar/actions/workflows/pulsar-ci.yaml) and [pulsar-ci-flaky.yaml](https://github.com/apache/pulsar/actions/workflows/pulsar-ci-flaky.yaml) workflows. The builds must pass before a release is performed.
2928

3029
If you haven't already done it, [create and publish the GPG key](create-gpg-keys.md). You will use the key to sign the release artifacts.
3130

@@ -43,6 +42,14 @@ Before you start the next release steps, make sure you have installed these soft
4342

4443
Please refer to ["Setting up JDKs and Maven using SDKMAN"](setup-buildtools.md) for details on how to install JDKs and Maven using SDKMAN.
4544

45+
## Prepare the release branch
46+
47+
Before starting a release, besides handling the PRs, it's necessary to check that there aren't open critical security vulnerabilities in the dependencies. This can be checked from GitHub Security Alerts and the [OWASP Dependency Check workflow run logs](https://github.com/apache/pulsar/actions/workflows/ci-owasp-dependency-check.yaml).
48+
49+
In addition, it's useful to check whether there's [a new release of Netty available](https://netty.io/news/index.html) with important fixes.
50+
51+
To verify the release branch is not broken, you should trigger a Pulsar CI builds for the [pulsar-ci.yaml](https://github.com/apache/pulsar/actions/workflows/pulsar-ci.yaml) and [pulsar-ci-flaky.yaml](https://github.com/apache/pulsar/actions/workflows/pulsar-ci-flaky.yaml) workflows. The builds must pass before a release is performed.
52+
4653
## Set environment variables to be used across the commands {#env-vars}
4754

4855
```shell
@@ -157,7 +164,9 @@ cd $PULSAR_PATH
157164

158165
# Commit
159166
git commit -m "Release $VERSION_WITHOUT_RC" -a
167+
```
160168

169+
```shell
161170
# Create a "candidate" tag
162171
git tag -u $APACHE_USER@apache.org v$VERSION_RC -m "Release $VERSION_RC"
163172

@@ -304,17 +313,19 @@ svn ci -m "Staging artifacts and signature for Pulsar release $VERSION_RC"
304313

305314
Upload the artifacts to ASF Nexus:
306315

316+
```shell
317+
# add space before the "export APACHE_PASSWORD" so that the password doesn't get added to shell history
318+
# set your ASF password in the following line
319+
export APACHE_PASSWORD=""
320+
```
321+
307322
```shell
308323
cd $PULSAR_PATH
309324
# ensure the correct JDK version is used for building
310325
sdk u java $SDKMAN_JAVA_VERSION
311326
# Confirm if there are no other new dirs or files in the $PULSAR_PATH because all files in $PULSAR_PATH will be compressed and uploaded to ASF Nexus.
312327
git status
313328

314-
# add space before the "export APACHE_PASSWORD" so that the password doesn't get added to shell history
315-
# set your ASF password in the following line
316-
export APACHE_PASSWORD=""
317-
318329
# src/settings.xml from master branch to /tmp/mvn-apache-settings.xml since it's missing in some branches
319330
curl -s -o /tmp/mvn-apache-settings.xml https://raw.githubusercontent.com/apache/pulsar/master/src/settings.xml
320331

@@ -392,7 +403,14 @@ For creating and publishing the docker images, run the following commands:
392403
```shell
393404
# set your dockerhub username
394405
DOCKER_USER=<your-dockerhub-username>
406+
```
407+
408+
```shell
409+
# login to dockerhub
410+
docker login -u $DOCKER_USER
411+
```
395412

413+
```shell
396414
# ensure that you have the most recent base image locally
397415
docker pull ubuntu:22.04 # for 3.0.x
398416
docker pull alpine:3.20 # for 3.3.x+
@@ -401,9 +419,6 @@ cd $PULSAR_PATH
401419
# ensure the correct JDK version is used for building
402420
sdk u java $SDKMAN_JAVA_VERSION
403421

404-
# login to dockerhub
405-
docker login -u $DOCKER_USER
406-
407422
mvn install -pl docker/pulsar,docker/pulsar-all \
408423
-DskipTests \
409424
-Pmain,docker,docker-push \
@@ -444,15 +459,14 @@ Set also these
444459
```shell
445460
PULSAR_IMAGE_NAME="$DOCKER_USER/pulsar:$VERSION_WITHOUT_RC-$(git rev-parse --short=7 v$VERSION_RC^{commit})"
446461
PULSAR_ALL_IMAGE_NAME="$DOCKER_USER/pulsar-all:$VERSION_WITHOUT_RC-$(git rev-parse --short=7 v$VERSION_RC^{commit})"
447-
# validate pulling, will take some time, you can skip this if you have a slow internet connection
448-
docker pull $PULSAR_IMAGE_NAME
449-
docker pull $PULSAR_ALL_IMAGE_NAME
450-
# check that images are about right, you can skip this if you have a slow internet connection
451-
docker run --rm $PULSAR_IMAGE_NAME bash -c 'ls /pulsar/lib' |less
452-
docker run --rm $PULSAR_ALL_IMAGE_NAME bash -c 'ls /pulsar/lib' |less
453-
# check that Pulsar standalone starts too (use CTRL-C to terminate)
454-
docker run --rm $PULSAR_IMAGE_NAME /pulsar/bin/pulsar standalone
455-
docker run --rm $PULSAR_ALL_IMAGE_NAME /pulsar/bin/pulsar standalone
462+
```
463+
464+
```shell
465+
# check that Pulsar standalone starts (use CTRL-C to terminate) for both architectures
466+
docker run --platform linux/arm64 --rm $PULSAR_IMAGE_NAME /pulsar/bin/pulsar standalone
467+
docker run --platform linux/amd64 --rm $PULSAR_IMAGE_NAME /pulsar/bin/pulsar standalone
468+
docker run --platform linux/arm64 --rm $PULSAR_ALL_IMAGE_NAME /pulsar/bin/pulsar standalone
469+
docker run --platform linux/amd64 --rm $PULSAR_ALL_IMAGE_NAME /pulsar/bin/pulsar standalone
456470
```
457471

458472
Now you can render the template to the clipboard

0 commit comments

Comments
 (0)