FINERACT-2219: capture v1.11.0 lessons learned in asciidoc and fineract release plugin

* don't bother making MD5 files, they aren't necessary
* step12 changed, stub it out and reference FINERACT-1817 for future improvements (looks like svn mv is not yet supported)
* use latest vote message template, based on https://lists.apache.org/thread/cs5t0ho39ktg2jxr74dqd7fg9nyfcz3k
* use more explicit form of `git push` to push release tag, see https://stackoverflow.com/questions/5195859/how-do-you-push-a-tag-to-a-remote-repository-using-git
* use consistent language re: tarball, file, artifact, release candidate
* fix some source listings that shouldn't be using macro expansion: this messes up URLs (hides scheme)
* fix asciidoc link to FINERACT-1229
* clean up copyright years: use variable properly and remove unnecessary extra copyright in preface (it appears directly above, in the license)
* de-indent URL in apache license -- this makes the link clickable in rendered HTML and PDF asciidoc outputs
This commit is contained in:
Adam Monsen
2025-03-24 14:30:21 +01:00
committed by Adam Saghy
parent b2af4a635c
commit 3f2079566c
15 changed files with 91 additions and 88 deletions
@@ -334,8 +334,6 @@ class FineractPlugin implements Plugin<Project> {
gpgService.sign(step.gpg)
step.gpg.files.findAll {
gpgService.md5(step.gpg)
gpgService.sha512(step.gpg)
}
}
@@ -440,29 +438,10 @@ class FineractPlugin implements Plugin<Project> {
project.tasks.register("fineractReleaseStep12") {
doFirst {
FineractPluginExtension.FineractPluginStep step = step(extension, "step12")
String version = project.properties?['fineract.release.version']
if(!version) {
TextIO textIO = TextIoFactory.getTextIO()
version = textIO.newStringInputReader()
.withPattern("\\d+.\\d+.\\d+")
.read("Release Version");
}
// TODO: input validation, see FINERACT-1610
subversionService.checkout(step.subversion)
def directory = step.subversion.directory?:System.getProperty("java.io.tmpdir") + "/fineract-dist-release"
def source = new File("fineract-war/build/distributions")
def target = new File("${directory}/${version}")
FileUtils.copyDirectory(source, target, true)
subversionService.commit(step.subversion)
// TODO: implement this, see FINERACT-1817
printInstructions(project, "step12")
}
}
@@ -116,15 +116,6 @@ class GpgService {
return generator.generate();
}
void md5(FineractPluginExtension.FineractPluginGpgParams params) {
params.files.findAll {
def result = calc(new FileInputStream(it), MessageDigest.getInstance("MD5", BouncyCastleProvider.PROVIDER_NAME))
def file = new File("${it}.md5")
file.write result
}
}
void sha512(FineractPluginExtension.FineractPluginGpgParams params) {
params.files.findAll {
def result = calc(new FileInputStream(it), MessageDigest.getInstance("SHA-512", BouncyCastleProvider.PROVIDER_NAME))
@@ -20,15 +20,15 @@
-->
Hello everyone,
... we have created Apache Fineract ${project['fineract.release.version']} release, with the artifacts below up for a vote.
We are proud to present Apache Fineract ${project['fineract.release.version']}, with the artifacts below up for a vote. Releases are important for a number of reasons: They put a stamp of approval on a set of code changes and they build momentum for future improvements.
It fixes the following issues: https://cwiki.apache.org/confluence/display/FINERACT/${project['fineract.release.version']}+-+Apache+Fineract
Release notes and ChangeLog: https://cwiki.apache.org/confluence/display/FINERACT/${project['fineract.release.version']}+-+Apache+Fineract
Source & Binary files : https://dist.apache.org/repos/dist/dev/fineract/${project['fineract.release.version']}/
Source and binary artifacts: https://dist.apache.org/repos/dist/dev/fineract/${project['fineract.release.version']}/
Tag to be voted on (rc#): https://gitbox.apache.org/repos/asf?p=fineract.git;a=commit;h=refs/heads/${project['fineract.release.version']}
Tagged as ${project['fineract.release.version']}
Fineract's KEYS containing the PGP key we used to sign the release: https://dist.apache.org/repos/dist/dev/fineract/KEYS
Committer PGP keys, including the release signing key: https://dist.apache.org/repos/dist/dev/fineract/KEYS
Note that this release contains source and binary artifacts.
@@ -38,6 +38,16 @@ This vote will be open for 72 hours:
[ ] +0 no opinion
[ ] -1 disapprove (and reason why)
Please indicate if you are a binding vote (member of the PMC).
Please also indicate with "Tested: YES/NO/PARTIAL" if you have locally built and/or tested these artifacts and/or a clone of the code checked out to the release commit, following the form:
Tested: YES ... Verified integrity and signatures of release artifacts locally, built from source, ran jar/war: Did everything mentioned in the current release candidate verification guidance ( https://lists.apache.org/thread/hym94pdy3nk9gjspkz4qonv2v15n5dpo ). If you did more than that, please specify.
Tested: NO ... No testing performed on release candidate, e.g. relying on testing performed by other contributors ( https://lists.apache.org/thread/q4xvombgzk99lpow23bdpvd7n0dx49lt , https://lists.apache.org/thread/42p54kfx69olcopdg4lojgpj1drmbmtw ) and/or output of GitHub Actions, while exercising my right to vote.
Tested: PARTIAL ... Please specify.
Cheers,
${project['fineract.config.name']}
@@ -0,0 +1,29 @@
<#--
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.
-->
[INSTRUCTIONS:START]
Move the release candidate from the dev area to the release area using a Subversion server-side copy:
svn mv https://dist.apache.org/repos/dist/dev/fineract/${project['fineract.release.version']} https://dist.apache.org/repos/dist/release /fineract/
[INSTRUCTIONS:END]
@@ -27,9 +27,9 @@ Following are the typical things we need to verify before voting on a release ca
Make sure release artifacts are hosted at https://dist.apache.org/repos/dist/dev/fineract
* Release candidates should be in format apache-fineract-${project['fineract.release.version']}-binary.tar.gz
* Verify signatures and hashes. You may have to import the public key of the release manager to verify the signatures. (`gpg --recv-key <key id>`)
* Verify signatures and hashes. You may have to import the public key of the release manager to verify the signatures. (gpg --import KEYS or gpg --recv-key <key id>)
* Git tag matches the released bits (diff -rf)
* Can compile successfully from source
* Can compile docs and code successfully from source
* Verify DISCLAIMER, NOTICE and LICENSE (year etc)
* All files have correct headers (Rat check should be clean - gradlew rat)
* No jar files in the source artifacts
@@ -29,4 +29,4 @@ public class YourThingValidator {
== Declarative
[FINERACT-1229](https://issues.apache.org/jira/browse/FINERACT-1229) is an open issue about adopting Bean Validation for _declarative_ instead of _programmatic_ (as above) validation. Contributions welcome!
https://issues.apache.org/jira/browse/FINERACT-1229[FINERACT-1229] is an open issue about adopting Bean Validation for _declarative_ instead of _programmatic_ (as above) validation. Contributions welcome!
@@ -9,7 +9,7 @@ Next, you create a git tag from the HEAD of the release's git branch.
% git checkout {revnumber}
% ./gradlew clean integrationTests <1>
% git tag -a {revnumber} -m "Fineract {revnumber} release"
% git push origin {revnumber}
% git push origin tag {revnumber}
----
<1> Run additonally manual tests with the community app.
@@ -2,33 +2,31 @@
== Description
Create source and binary artifacts. Make sure to do some sanity checks. The tar and the release branch should match.
Create source and binary tarballs.
[source,bash,subs="attributes+,+macros"]
[source,bash,subs="attributes+"]
----
% cd /fineract-release-preparations <1>
% tar -xvf apache-fineract-{revnumber}-src.tar.gz
% git clone https://git-wip-us.apache.org/repos/asf/fineract.git
% ./gradlew build -x test
----
Look in `fineract-war/build/distributions/` for the tarballs.
Make sure to do some sanity checks. The source tarball and the code in the release branch (at the commit with the release tag) should match.
[source,bash,subs="attributes+"]
----
% cd /fineract-release-preparations
% tar -xvf path/to/apache-fineract-{revnumber}-src.tar.gz
% git clone git@github.com:apache/fineract.git
% cd fineract/
% git checkout tags/{revnumber}
% cd ..
% diff -r fineract apache-fineract-{revnumber}-src
% diff -r fineract apache-fineract-{revnumber}
----
<1> Do a fresh clone of the tag.
Make sure code compiles and tests pass on the uncompressed source.
Make sure the code compiles and tests pass on the uncompressed source. Do as much testing as you can and share what you did. Ideally you'd build code and docs and run every possible test and check, but https://github.com/apache/fineract/actions[running everything has complex dependencies, caches, and takes many hours]. It is rarely done in practice offline / local / on developer machines. But please, go ahead and run the test and doc tasks, and more! Grab a cup of coffee and run everything you can. See the various builds in `.github/workflows/` and try the same things on your own. We should all hammer on a release candidate as much as we can to see if it breaks and fix it if so. All that of course improves our final release.
[source,bash,subs="attributes+,+macros"]
----
% cd apache-fineract-{revnumber}-src/fineract-provider <1>
% gradlew clean integrationTest <2>
% gradlew clean build <3>
% gradlew rat <4>
----
<1> Make sure prerequisites are met before running these commands.
<2> For running integration tests
<3> For building deploy able war
<4> For RAT checks
Finally, inspect `apache-fineract-{revnumber}-binary.tar.gz`. Make sure the `fineract-provider-{revnumber}.jar` can be run directly, and the `fineract-provider.war` can be run with Tomcat.
== Gradle Task
@@ -2,15 +2,13 @@
== Description
All release artifacts must be signed. In order to sign a release you will need a PGP key. You should get your key signed by a few other people. You will also need to receive their keys from a public key server. See the Apache release signing page for more details. Please follow the steps defined in Release Sign.
Release source and binary tarballs must be checksummed and signed. In order to sign a release you will need a PGP key. You should get your key signed by a few other people. You will also need to receive their keys from a public key server. See the https://www.apache.org/legal/release-policy.html#release-signing[Apache release policy] for more details.
[source,bash,subs="attributes+,+macros"]
----
% gpg --armor --output apache-fineract-{revnumber}-src.tar.gz.asc --detach-sig apache-fineract-{revnumber}-src.tar.gz
% gpg --print-md MD5 apache-fineract-{revnumber}-src.tar.gz > apache-fineract-{revnumber}-src.tar.gz.md5
% gpg --print-md SHA512 apache-fineract-{revnumber}-src.tar.gz > apache-fineract-{revnumber}-src.tar.gz.sha512
% gpg --armor --output apache-fineract-{revnumber}--binary.tar.gz.asc --detach-sig apache-fineract-{revnumber}-binary.tar.gz
% gpg --print-md MD5 apache-fineract-{revnumber}-binary.tar.gz > apache-fineract-{revnumber}-binary.tar.gz.md5
% gpg --armor --output apache-fineract-{revnumber}-binary.tar.gz.asc --detach-sig apache-fineract-{revnumber}-binary.tar.gz
% gpg --print-md SHA512 apache-fineract-{revnumber}-binary.tar.gz > apache-fineract-{revnumber}-binary.tar.gz.sha512
----
@@ -4,26 +4,27 @@
Finally create a directory with release name ({revnumber} in this example) in https://dist.apache.org/repos/dist/dev/fineract and add the following files in this new directory:
* apache-fineract-{revnumber}-binary.tar.gz.sha
* apache-fineract-{revnumber}-binary.tar.gz
* apache-fineract-{revnumber}-binary.tar.gz.sha512
* apache-fineract-{revnumber}-binary.tar.gz.asc
* apache-fineract-{revnumber}-binary.tar.gz.md5
* apache-fineract-{revnumber}-src.tar.gz.sha
* apache-fineract-{revnumber}-src.tar.gz
* apache-fineract-{revnumber}-src.tar.gz.sha512
* apache-fineract-{revnumber}-src.tar.gz.asc
* apache-fineract-{revnumber}-src.tar.gz.md5
Upload binary and source archives to ASF's distribution dev (staging) area:
These files (or "artifacts") make up the release candidate.
[source,bash,subs="attributes+,+macros"]
Upload these files to ASF's distribution dev (staging) area:
[source,bash,subs="attributes+"]
----
% svn co https://dist.apache.org/repos/dist/dev/fineract/ fineract-dist-dev
% mkdir fineract-dist-dev/{revnumber}
% cp fineract/build/distributions/* fineract-dist-dev/{revnumber}/
% cp path/to/files/* fineract-dist-dev/{revnumber}/
% cd fineract-dist-dev
% svn commit
----
NOTE: You will need your ASF Committer credentials to be able to access the Subversion host https://dist.apache.org via.
NOTE: You will need your ASF Committer credentials to be able to access the Subversion host at `dist.apache.org`.
== Gradle Task
@@ -6,12 +6,12 @@ Following are the typical things we need to verify before voting on a release ca
Make sure release artifacts are hosted at https://dist.apache.org/repos/dist/dev/fineract
* Release candidates should be in format apache-fineract-{revnumber}-binary.tar.gz
* Verify signatures and hashes. You may have to import the public key of the release manager to verify the signatures. (`gpg --recv-key <key id>`)
* Git tag matches the released bits (diff -rf)
* Can compile successfully from source
* Release candidate files should match filenames mentioned earlier, and will be moved without renaming if/when the release vote passes.
* Verify signatures and hashes. You may have to import the public key of the release manager to verify the signatures. (`gpg --import KEYS` or `gpg --recv-key <key id>`)
* Git tag matches the released bits (`diff -rf`)
* Can compile docs and code successfully from source
* Verify DISCLAIMER, NOTICE and LICENSE (year etc)
* All files have correct headers (Rat check should be clean - gradlew rat)
* All files have correct headers (Rat check should be clean - `./gradlew rat`)
* No jar files in the source artifacts
* Integration tests should work
@@ -2,15 +2,11 @@
== Description
In order to release you have to checkout release repository located on https://dist.apache.org/repos/dist/release/fineract and add release artifacts there.
Move the release candidate from the dev area to the release area using a Subversion server-side copy.
[source,bash,subs="attributes+,+macros"]
[source,bash,subs="attributes+"]
----
% svn co https://dist.apache.org/repos/dist/release/fineract fineract-release
% mkdir fineract-release/{revnumber}/
% cp fineract-dist-dev/{revnumber}/* fineract-release/{revnumber}/
% svn add fineract-release/{revnumber}/
% svn commit -m "Fineract Release {revnumber}" fineract-release/{revnumber}/
% svn mv https://dist.apache.org/repos/dist/dev/fineract/{revnumber} https://dist.apache.org/repos/dist/release/fineract/
----
You will now get an automated email from the Apache Reporter Service (no-reply@reporter.apache.org), subject "Please add your release data for 'fineract'" to add the release data (version and date) to the database on https://reporter.apache.org/addrelease.html?fineract (requires PMC membership).
@@ -22,3 +18,5 @@ You will now get an automated email from the Apache Reporter Service (no-reply@r
----
% ./gradlew fineractReleaseStep12 -Pfineract.release.version={revnumber}
----
CAUTION: This task is not yet automated!
@@ -4,7 +4,7 @@
Finally update the https://fineract.apache.org website with the latest release details. The website's HTML source code is available at https://github.com/apache/fineract-site.
CAUTION: This step is not yet updated. We are working on a static site generator setup.
CAUTION: This step is not yet automated. We are working on a static site generator setup.
== Gradle Task
+2 -2
View File
@@ -1,12 +1,12 @@
= License
Copyright 2022 Apache Foundation
Copyright (C) {years} Apache Foundation
Licensed 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
https://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,
-1
View File
@@ -1,6 +1,5 @@
[preface]
= Preface
(C) {years}
:hardbreaks: