Pravega release process (deprecated) - derekm/pravega GitHub Wiki
THIS PAGE IS DEPRECATED. CHECK OUT OUR HOW TO RELEASE PAGE INSTEAD.
In order to perform a release of pravega, you will need the following:
- pravega GPG signing key and password
- dockerhub username/password with access to the pravega repository
- sonatype username/password with access to the io.pravega group
Bug fix releases do not require creating a new branch. To start a bug fix release, execute the following steps:
- Update the project versions (pravegaVersion, connectorVersion, samplesVersion) gradle property to match the release by dropping the
-SNAPSHOT
and replacing it withrc0
in the release branch. Make sure to checkout the release branch before making this change, e.g.,git checkout r0.1
for a bug fix release against ther0.1
branch. - For every new release candidate, assuming the first one does not make it, update the number, e.g., update to
rc1
if the current one isrc0
. - Tag the release candidate and push the tag:
> git checkout rA.B`
> git tag -m "Release candidate X of version A.B.C" vA.B.C-rcX
> git push upstream vA.B.C-rcX
where A.B.C
is the release version and X
is the release candidate number.
In each repository (pravega/pravega
, pravega/flink-connectors
, pravega/pravega-sample
) do the following:
- Create a release branch for the version and push the branch:
> git checkout master
> git checkout -b <release-branch>
> git push upstream <release-branch>
<release-branch>
is the name of the branch, e.g., r0.1
. Note that the name only includes the first two digits of a release version as the third digit refers to bug-fix releases.
- Update the project versions (pravegaVersion, connectorVersion, samplesVersion) gradle property to match the release by dropping the
-SNAPSHOT
and replacing it withrc0
. This creates the first release candidate, which isrc0
. For every new release candidate, update the number, e.g., update torc1
if the current one isrc0
. - Tag the release candidate
- Update the master branch for the next version of pravega (e.g.: 0.2.0-SNAPSHOT)
This is a first cut of the voting process. Share the release candidate tag on Slack:
https://codecommunity.slack.com/archives/C1QMHTRAS
and request users and contributors to vote. Here is a message template:
Howdy,
This is release candidate X of version A.B.C:
https://github.com/pravega/pravega/tree/vA.B.C-rcX
Please vote +1 if we should release this candidate, and -1 otherwise.
We encourage everyone to participate and give feedback, but only the
committer votes are binding. The vote passes upon lazy consensus and
the vote closes in 72 hours.
- The Pravega Engineering Team
In each repository (pravega/pravega
, pravega/flink-connectors
, pravega/pravega-samples
) do the following:
- Click on Releases in GitHub and click Draft New Release
- Choose the tag in the format v0.1.0. Note that this will both serve as the release tag but will also tag the code
- Choose the appropriate branch (e.g., r0.1)
- Add a title and description
- Upload any of the build artifacts. These can be grabbed for the last successful jenkins build
- Click Publish Release
- Release descriptions can be edited after the fact if needed. This provides a way to convert a release candidate into a final release.
- A new version release should include release notes which should include the
git log
of all the commits since the last release. (You can upload a local text file by dragging it into the description box.)
- Publish artifacts to maven central using the following command:
./gradlew clean assemble publish -PdoSigning=true -Psigning.password=<signing-password> -PpublishUrl=mavenCentral -PpublishUsername=<sonatype-username> -PpublishPassword=<sonatype-password>
-
Login to Nexus Repository Manager using sonatype credentials with write access to io.pravega group.
-
Under Build Promotion -> Staging Repositories, locate the staging repository that was created for the latest publish (format iopravega-XXXX, for example iopravega-1004)
-
Select the repository and select the Close button in the top menu bar. This will perform validations to ensure that the contents meets the maven requirements (contains signatures, javadocs, sources, etc). This operation takes a short time to complete, press the Refresh button in the top menu bar occasionally until the operation completes.
-
Once the operation completes, locate the URL field in the Summary tab of the newly closed repository (it will be something like
https://oss.sonatype.org/content/repositories/iopravega-XXXX
where XXXX is the number of the staging repository). This should be tested to ensure that all artifacts are present and functions as expected. -
Once the staging repository is created (before performing the Release), verify that the dependencies work by modifying the
pravega/flink-connectors
build to include the staging repository as a repository:
pravega/flink-connectors/build.gradle
repositories {
...
// Add staging repository to test that everything works
maven {
url "https://oss.sonatype.org/content/repositories/iopravega-<XXXX>"
}
}
Ensure the pravegaVersion
in gradle.properties
matches the version that is staged in that repository and test the build:
./gradlew clean build
Once the pravega artifacts are released to maven central, the staging repository should be removed and then retest the build.
- When satisfied that everything is working, you can select the Release button in the top menu bar. NOTE: Once this completes you will not be able to remove or modify the artifacts so be sure everything is in good working order before doing this step.
Now publish the flink-connectors to maven central using the steps described in Maven Releases. Once the staging repository is created (before performing the Release), verify that the dependencies work by modifying the pravega/pravega-samples
build to include the staging repository as a repository:
pravega/pravega-samples/build.gradle
repositories {
...
// Add staging repository to test that everything works
maven {
url "https://oss.sonatype.org/content/repositories/iopravega-<XXXX>"
}
}
Ensure the connectorVersion
in gradle.properties
matches the version that is staged in that repository and test the build:
./gradlew clean build
Once the flink-connectors artifacts are released to maven central, the staging repository should be removed and then retest the build.
To publish the Docker images to Dockerhub, do the following:
- Have published the pravega JARs to maven central following the steps above in the Maven Releases section.
-
sudo docker login
(using a dockerhub account with write access) -
sudo ./gradlew clean docker dockerPush
(this pushes the specific version tags) -
sudo docker push pravega/pravega:latest && sudo docker push pravega/bookkeeper:latest
(this updates the latest tags, if desired)