This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new f1a1f12 staging and setting up vote for release candidates (#2681)
f1a1f12 is described below
commit f1a1f12195d8538338d000dba71fb2e98de0afbb
Author: Surinder Singh <[email protected]>
AuthorDate: Mon Apr 12 12:42:16 2021 -0700
staging and setting up vote for release candidates (#2681)
This change automates staging of release candidate. The artifacts are staged
to SVN and nexus repositories.
This change uses
https://github.com/vlsi/vlsi-release-plugins/blob/master/plugins/stage-vote-release-plugin/README.md.
Preparing release candidate:
1. Checkout release branch: `git checkout -b branch-4.14 origin/branch-4.14`
2. Update the version in version.gradle and commit the change
3. Create and stage release candidate. This will build and upload all
release
artifacts to staging areas under nexus and SVN repos. A template for Vote
email will also be generated. Link to the release notes will need to be
updated in the email template. A release candidate tag will also be added.
```
./gradlew prepareVote -Pasf -Prc=1
```
4. If needed additional release candidates can be create by running the
above
command with appropriate `rc` value
5. Once the voting is done, the release can be published using:
```
./gradlew publishDist -Pasf -Prc=1
```
6. Remove stale artifacts:
```
./gradlew removeStaleArtifacts -Pasf
```
Configuration:
* Following configuration can be added to $HOME/.gradle/gradle.properties.
```
signing.gnupg.keyName=...
asfCommitterId=...
asfNexusUsername=...
asfNexusPassword=...
asfGitSourceUsername=...
asfGitSourcePassword=...
asfGitSitePreviewUsername=...
asfGitSitePreviewPassword=...
asfSvnUsername=...
asfSvnPassword=...
```
* The above config can also be passed from commandline
`-P<property>=<value>`
Testing:
The change was testing useing a local setup based on
https://github.com/vlsi/asflike-release-environment
Co-authored-by: Surinder Singh <[email protected]>
Co-authored-by: Matteo Merli <[email protected]>
---
bookkeeper-dist/all/build.gradle | 5 ++
bookkeeper-dist/bkctl/build.gradle | 5 ++
bookkeeper-dist/build.gradle | 5 ++
bookkeeper-dist/server/build.gradle | 5 ++
.../codahale-metrics-provider/build.gradle | 2 +
build.gradle | 25 +++++++-
dev/release/build.gradle.kts | 70 ++++++++++++++++++++++
gradle/wrapper/gradle-wrapper.properties | 2 +-
settings.gradle | 1 +
9 files changed, 117 insertions(+), 3 deletions(-)
diff --git a/bookkeeper-dist/all/build.gradle b/bookkeeper-dist/all/build.gradle
index 8f96b9f..de4c09e 100644
--- a/bookkeeper-dist/all/build.gradle
+++ b/bookkeeper-dist/all/build.gradle
@@ -19,6 +19,7 @@
plugins {
id 'java'
id 'distribution'
+ id "com.github.vlsi.stage-vote-release"
}
description = 'Apache BookKeeper :: Dist (All)'
@@ -53,6 +54,10 @@ jar {
archiveBaseName = 'bookkeeper-dist-all'
}
+releaseArtifacts {
+ artifact(tasks.named("distTar"))
+}
+
def depLicences = [
"checker-qual-3.5.0/LICENSE",
"google-auth-library-credentials-0.20.0/LICENSE",
diff --git a/bookkeeper-dist/bkctl/build.gradle
b/bookkeeper-dist/bkctl/build.gradle
index 2993f60..4d287c9 100644
--- a/bookkeeper-dist/bkctl/build.gradle
+++ b/bookkeeper-dist/bkctl/build.gradle
@@ -21,12 +21,17 @@ import
org.gradle.api.artifacts.transform.TransformParameters
plugins {
id 'java'
id 'distribution'
+ id "com.github.vlsi.stage-vote-release"
}
dependencies {
implementation project(":bookkeeper-tools")
}
+releaseArtifacts {
+ artifact(tasks.named("distTar"))
+}
+
def depLicences = [
"checker-qual-3.5.0/LICENSE",
"google-auth-library-credentials-0.20.0/LICENSE",
diff --git a/bookkeeper-dist/build.gradle b/bookkeeper-dist/build.gradle
index c7b3a5b..5f15eae 100644
--- a/bookkeeper-dist/build.gradle
+++ b/bookkeeper-dist/build.gradle
@@ -18,6 +18,11 @@
*/
plugins {
id 'distribution'
+ id "com.github.vlsi.stage-vote-release"
+}
+
+releaseArtifacts {
+ artifact(tasks.named("distTar"))
}
distributions {
diff --git a/bookkeeper-dist/server/build.gradle
b/bookkeeper-dist/server/build.gradle
index 3fd2b4b..7011172 100644
--- a/bookkeeper-dist/server/build.gradle
+++ b/bookkeeper-dist/server/build.gradle
@@ -19,10 +19,15 @@
plugins {
id 'java'
id 'distribution'
+ id "com.github.vlsi.stage-vote-release"
}
description = 'Apache BookKeeper :: Dist (Server)'
+releaseArtifacts {
+ artifact(tasks.named("distTar"))
+}
+
// implementation project(':bookkeeper-http:vertx-http-server')
dependencies {
diff --git a/bookkeeper-stats-providers/codahale-metrics-provider/build.gradle
b/bookkeeper-stats-providers/codahale-metrics-provider/build.gradle
index 12f3747..b60c3c5 100644
--- a/bookkeeper-stats-providers/codahale-metrics-provider/build.gradle
+++ b/bookkeeper-stats-providers/codahale-metrics-provider/build.gradle
@@ -37,6 +37,8 @@ dependencies {
testCompileOnly depLibs.lombok
+ testImplementation depLibs.junit
+
annotationProcessor depLibs.lombok
testAnnotationProcessor depLibs.lombok
}
diff --git a/build.gradle b/build.gradle
index ec69a09..1b32c48 100644
--- a/build.gradle
+++ b/build.gradle
@@ -25,6 +25,7 @@ buildscript {
plugins {
id 'com.google.protobuf'
id 'java'
+ id "com.github.vlsi.stage-vote-release" version "1.73"
id 'checkstyle'
id 'org.nosphere.apache.rat'
}
@@ -34,6 +35,27 @@ subprojects {
}
apply from: "$rootDir/version.gradle"
+version = buildVersion
+
+releaseArtifacts {
+ fromProject("bookkeeper-dist")
+ fromProject("bookkeeper-dist-all")
+ fromProject("bookkeeper-dist-bkctl")
+ fromProject("bookkeeper-dist-server")
+}
+
+releaseParams { // ReleaseExtension
+ tlp.set("Bookkeeper")
+ componentName.set("Apache Bookkeeper")
+ releaseTag.set("release-$buildVersion")
+ rcTag.set(rc.map { "release-$buildVersion-rc$it" })
+
+ sitePreviewEnabled.set(false)
+
+ nexus {
+ packageGroup.set("org.apache.bookkeeper")
+ }
+}
allprojects {
apply from: "$rootDir/dependencies.gradle"
@@ -141,7 +163,6 @@ allprojects {
version = buildVersion
from components.java
- artifact testJar
}
}
}
@@ -167,7 +188,7 @@ allprojects {
useInMemoryPgpKeys(signingKey, signingPassword)
}
}
- sign publishing.publications.maven
+ // Signing task is added by the release plugin
}
}
}
diff --git a/dev/release/build.gradle.kts b/dev/release/build.gradle.kts
new file mode 100644
index 0000000..ebaf105
--- /dev/null
+++ b/dev/release/build.gradle.kts
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import com.github.vlsi.gradle.release.ReleaseExtension
+import com.github.vlsi.gradle.release.ReleaseParams
+
+plugins {
+ id("com.github.vlsi.stage-vote-release")
+}
+
+rootProject.configure<ReleaseExtension> {
+ voteText.set { it.voteTextGen() }
+}
+
+fun ReleaseParams.voteTextGen(): String = """
+From: Release Manager
+To: [email protected]
+Subject: [VOTE] Release $version, release candidate #$rc
+
+Hi everyone,
+Please review and vote on the release candidate $rc for the version $version,
as follows:
+[ ] +1, Approve the release
+[ ] -1, Do not approve the release (please provide specific comments)
+
+The complete staging area is available for your review, which includes:
+* Release notes [1]
+ * ** Add release notes url **
+* The official Apache source and binary distributions to be deployed to
dist.apache.org
+ *
https://dist.apache.org/repos/dist/dev/bookkeeper/bookkeeper-$version-rc$rc/
+
+* All artifacts to be deployed to the Maven Central Repository
+ *
https://repository.apache.org/content/repositories/staging/org/apache/bookkeeper/
+
+* Source code tag "release-$version-rc$rc" [4] with git sha $gitSha
+
+BookKeeper's KEYS file contains PGP keys we used to sign this release:
+https://dist.apache.org/repos/dist/release/bookkeeper/KEYS
+
+Please download these packages and review this release candidate:
+
+- Review release notes
+- Download the source package (verify shasum, and asc) and follow the
instructions
+ to build and run the bookkeeper service.
+- Download the binary package (verify shasum, and asc) and follow the
instructions
+ to run the bookkeeper service.
+- Review maven repo, release tag, licenses, and any other things you think it
is
+ important to a release.
+
+The vote will be open for at least 72 hours. It is adopted by majority
approval, with at least 3 PMC affirmative votes.
+
+Thanks,
+Release Manager
+""".trimIndent()
+
diff --git a/gradle/wrapper/gradle-wrapper.properties
b/gradle/wrapper/gradle-wrapper.properties
index 07f97c7..2f14a2d 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -21,6 +21,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/settings.gradle b/settings.gradle
index c724835..fa45234 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -54,6 +54,7 @@ include(':bookkeeper-benchmark',
'circe-checksum:src:main:circe',
'cpu-affinity',
'cpu-affinity:src:main:affinity',
+ 'dev:release',
'microbenchmarks',
'shaded:distributedlog-core-shaded',
'stats:utils',