Repository: incubator-samza Updated Branches: refs/heads/master 4f189128e -> 2aad5c4c8
SAMZA-199: Publish Maven builds as part of release Project: http://git-wip-us.apache.org/repos/asf/incubator-samza/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-samza/commit/2aad5c4c Tree: http://git-wip-us.apache.org/repos/asf/incubator-samza/tree/2aad5c4c Diff: http://git-wip-us.apache.org/repos/asf/incubator-samza/diff/2aad5c4c Branch: refs/heads/master Commit: 2aad5c4c84efe74a953f443616b87e9e69ab14e9 Parents: 4f18912 Author: Martin Kleppmann <[email protected]> Authored: Fri Jun 27 16:58:35 2014 +0100 Committer: Martin Kleppmann <[email protected]> Committed: Mon Jun 30 19:58:26 2014 +0100 ---------------------------------------------------------------------- RELEASE.md | 43 +++++++++++++++++++++++++++++++++++++++++- build.gradle | 7 +++++++ gradle/buildscript.gradle | 6 ++++++ gradle/release.gradle | 36 +++++++++++++++++++++++++++++++++++ 4 files changed, 91 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/2aad5c4c/RELEASE.md ---------------------------------------------------------------------- diff --git a/RELEASE.md b/RELEASE.md index 3d34f9f..b2a6bb6 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -15,8 +15,49 @@ To build a tarball suitable for an ASF source release (and its accompanying MD5 First, clean any non-checked-in files from git (this removes all such files without prompting): - git clean -d -f + git clean -fdx + +Alternatively, you can make a fresh clone of the repository to a separate directory: + + git clone https://git-wip-us.apache.org/repos/asf/incubator-samza.git samza-release + cd samza-release Then build the tarball: ./gradlew clean sourceRelease + +Then sign it: + + gpg --sign --armor --detach-sig build/distribution/source/samza-sources-*.tgz + +Make a signed git tag for the release candidate: + + git tag -s release-$VERSION-rc0 -m "Apache Samza $VERSION release candidate 0" + +Edit `$HOME/.gradle/gradle.properties` and add your GPG key information: + + signing.keyId=01234567 # Your GPG key ID, as 8 hex digits + signing.secretKeyRingFile=/path/to/secring.gpg # Normally in $HOME/.gnupg/secring.gpg + signing.password=YourSuperSecretPassphrase # Plaintext passphrase to decrypt key + nexusUsername=yourname # Your username on Apache's LDAP + nexusPassword=password # Your password on Apache's LDAP + +Putting your passwords there in plaintext is unfortunately unavoidable. The +[nexus plugin](https://github.com/bmuschko/gradle-nexus-plugin) supports asking +for them interactively, but unfortunately there's a +[Gradle issue](http://issues.gradle.org/browse/GRADLE-2357) which prevents us +from reading keyboard input (because we need `org.gradle.jvmargs` set). + +Build binary artifacts and upload them to the staging repository: + + # Set this to the oldest JDK which we are currently supporting for Samza. + # If it's built with Java 8, the classes won't be readable by Java 7. + export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home + ./gradlew clean uploadArchives + ./gradlew -PscalaVersion=2.9.2 clean uploadArchives + +Go to [repository web interface](https://repository.apache.org/), log in with +Apache LDAP credentials, go to "Staging Repositories", select the org.apache.samza +repository just created, and close it. This may take a minute or so. When it +finishes, the UI shows a staging repository URL. This can be used in a project +that depends on Samza, to test the release candidate. http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/2aad5c4c/build.gradle ---------------------------------------------------------------------- diff --git a/build.gradle b/build.gradle index f728330..ebed8f2 100644 --- a/build.gradle +++ b/build.gradle @@ -205,6 +205,13 @@ project(":samza-shell") { from 'src/main/bash' } + artifacts { + archives(shellTarGz) { + name 'samza-shell' + classifier 'dist' + } + } + // Usage: ./gradlew samza-shell:runJob \ // -PconfigPath=file:///path/to/job/config.properties task runJob(type:JavaExec) { http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/2aad5c4c/gradle/buildscript.gradle ---------------------------------------------------------------------- diff --git a/gradle/buildscript.gradle b/gradle/buildscript.gradle index 1de8e87..739a9c1 100644 --- a/gradle/buildscript.gradle +++ b/gradle/buildscript.gradle @@ -22,10 +22,16 @@ repositories { maven { url 'http://dl.bintray.com/content/netflixoss/external-gradle-plugins/' } + + // For gradle-nexus-plugin + maven { + url 'http://jcenter.bintray.com/' + } } } dependencies { classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.6.1' classpath 'de.obqo.gradle:gradle-lesscss-plugin:1.0-1.3.3' + classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.7.1' } http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/2aad5c4c/gradle/release.gradle ---------------------------------------------------------------------- diff --git a/gradle/release.gradle b/gradle/release.gradle index 751255f..48de564 100644 --- a/gradle/release.gradle +++ b/gradle/release.gradle @@ -49,3 +49,39 @@ task sourceRelease(type: Tar) { ant.checksum file:"$destinationDir/$archiveName" } } + +// Publishing to Apache's Maven repository (Nexus). To test this locally, set +// repositoryUrl and snapshotRepositoryUrl below to 'file://localhost/tmp/myRepo' +subprojects { + apply plugin: 'nexus' + + nexus { + attachSources = true + attachTests = false + attachJavadoc = true + sign = true + repositoryUrl = 'https://repository.apache.org/service/local/staging/deploy/maven2' + snapshotRepositoryUrl = 'https://repository.apache.org/content/repositories/snapshots' + } + + modifyPom { + project { + name 'Apache Samza (incubating)' + description 'A distributed stream processing framework built upon Apache Kafka and Apache Hadoop YARN.' + url 'http://samza.incubator.apache.org/' + + scm { + url 'https://git-wip-us.apache.org/repos/asf?p=incubator-samza.git;a=tree' + connection 'scm:http://git-wip-us.apache.org/repos/asf/incubator-samza.git' + developerConnection 'scm:https://git-wip-us.apache.org/repos/asf/incubator-samza.git' + } + + licenses { + license { + name 'The Apache Software License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + } + } +}
