...
Preparing the Code Base and Jenkins TLP Job
- Tell dev mailing list that merge windows close:
"Just a reminder that the merge window for Apache NetBeans <INSERTVERSION> will close on <INSERTDATE>. See Create a branch release<version> in https://cwikigithub.com/apache.org/confluence/display/NETBEANS/Release+Schedule
After the merge window closes, merges to master will be limited to fixes intended for the <INSERTVERSION> release, and should be made in accordance with the bug priority guidelines - see https://cwiki.apache.org/confluence/display/NETBEANS/Bug+Priority+Guidelines
Please help review and merge any remaining pull requests that are intended for <INSERTVERSION> before that date. However, if a pull request is not quite ready for merging but should be considered, mark with NB <INSERTVERSION> (milestone or label) and we'll review in the first few days after freeze.
All other contributions should be held back until the merge window for <INSERTNEXTVERSION> opens, some time after the release of <INSERTVERSION>.
A first beta of <INSERTVERSION> should be available some time next week."
Create a branch release<version> in /netbeans. <version> looks like 113 for Apache NetBeans 11.3 full name of branch is release113 - Create a milestone on github for next iteration. (to help triage)
- Create a section for release<version> in https://github.com/apache/netbeans-jenkins-lib/blob/master/meta/netbeansrelease.json (after the copy paste, read carefully to match date, change version, change position.
- Check on Jenkins that item appears for release<version> in https://builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbeans/ (all previous branches should be present).
- On freeze date create delivery branch to allow PR that will be resynch with release<version>
- Normal development will continue on master but before merging normal PR do a PR to increment spec version
ant increment-spec-versions
Taming JSON to Prepare Beta or Voting Candidates
https://github.com/apache/netbeans
...
Jira | ||||||
---|---|---|---|---|---|---|
|
...
Taming JSON to Prepare Beta or Voting Candidates
https://github.com/apache/netbeans-jenkins-lib/blob/master/meta/netbeansrelease.json
For each release section you will have milestones section. This section will help branding a special Apache NetBeans milestone.
If nothing is set in the section, it will release a dev version of current branch, e.g., 11.3-dev.
Preparing for beta:
Milestone section key are commit hash. If you want a commit hash to form a beta1 you need to add milestone entry (do not forget position):
"<commit hash>":{"version": "beta1","position": "1"}
Branding will contain beta information.
Preparing for voting candidate:
Milestone section key are commit hash. If you want a commit hash to form a beta1 you need to add milestone entry (do not forget position):
"<commit hash>":{"vote": "1","position": "2"}
Branding will contain release information.
Producing a Beta
1. Obtaining and Preparing the Beta files
On Apache Jenkins
- You have to set up json file milestone content.
- Go to https://builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbeans/
- Check that the build on release<version> and verify artefacts they should be branded with beta in their name. Cancel and relaunch build otherwise
- Wait for the job to be finished.
- Keep the build
On your computer
...
-jenkins-lib/blob/master/meta/netbeansrelease.json
For each release section you will have milestones section. This section will help branding a special Apache NetBeans milestone.
If nothing is set in the section, it will release a dev version of current branch, e.g., 11.3-dev.
Preparing for beta:
Milestone section key are commit hash. If you want a commit hash to form a beta1 you need to add milestone entry (do not forget position):
"<commit hash>":{"version": "beta1","position": "1"}
Branding will contain beta information.
Preparing for voting candidate:
Milestone section key are commit hash. If you want a commit hash to form a beta1 you need to add milestone entry (do not forget position):
"<commit hash>":{"vote": "1","position": "2"}
Branding will contain release information.
Producing a Beta
1. Obtaining and Preparing the Beta files
On Apache Jenkins
- You have to set up json file milestone content.
- Go to https://builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbeans/
- Check that the build on release<version> and verify artefacts they should be branded with beta in their name. Cancel and relaunch build otherwise
- Wait for the job to be finished.
- Keep the build
On your computer
- Download and extract the build artifacts.
Check the SHA512 checksums:
Code Block language bash theme Midnight find . -name '*.sha512' -execdir sha512sum --check '{}' \; #alternative for z in $(find . -name '*.sha512'); do cd $(dirname $z); sha512sum ./$(basename $z) --check --quiet; cd - >/dev/null; done
On the NetBeans virtual machine
- Prepare apidoc folder
Code Block | ||||
---|---|---|---|---|
| ||||
sudo su -
cd /var/www/bits.netbeans.org
mkdir 11.3
|
2. Distributing Beta via mailing lists
- Beta releases should be distributed directly from the Jenkins build job - eg.
Producing a Voting Candidate
Be sure to reync delivery branch with release branch.
1. Obtaining and Preparing the Voting Candidate Files
1.1 On Apache Jenkins:
- You have to set up json file milestone content.
- Go to the https://builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbeans/
- Check that the build on release<version> and verify artefacts they should be branded with like a voting candidate. Cancel and relaunch build otherwise
- Wait for the job to be finished.
- Keep the build
1.2 On your computer, once the build described in 1.1 above has succeeded:
Check the SHA512 checksums:
Code Block | ||||
---|---|---|---|---|
| ||||
find . -name '*.sha512' -execdir sha512sum --check '{}' \;
#alternative
for z in $(find . -name '*.sha512'); do cd $(dirname $z); sha512sum ./$(basename $z) --check --quiet; cd - >/dev/null; done |
On the NetBeans virtual machine
- Prepare apidoc folder
- Download and extract the build artifacts, specifically, "(all files in ZIP)" for "dist/netbeans" and "dist/netbeans-platform". This gets us the IDE, source and binary, NBM modules, and platform source and binary.
Check the SHA512 checksums:
Code Block language bash theme Midnight
...
find
...
. -
...
name '*.sha512' -execdir sha512sum --check '{}' \; #alternative for z in $(find . -name '*.sha512'); do cd $(dirname $z); sha512sum ./$(basename $z) --check --quiet; cd - >/dev/null; done
Sign the Release Files
Code Block language bash theme Midnight export GPG_EMAIL="YOU@apache.org" find . -name '*.zip' -exec gpg -u $GPG_EMAIL --armor --output {}.asc --detach-sign {} \; # Stop here if nbms are not going to be published find . -name '*.nbm' -exec gpg -u $GPG_EMAIL --armor --output {}.asc --detach-sign {} \; find . -name '*.gz' -exec gpg -u $GPG_EMAIL --armor --output {}.asc --detach-sign {} \; # nbm licenses
2. Distributing Beta via mailing lists
- Beta releases should be distributed directly from the Jenkins build job - eg.
Producing a Voting Candidate
1. Obtaining and Preparing the Voting Candidate Files
1.1 On Apache Jenkins:
- You have to set up json file milestone content.
- Go to the https://builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbeans/
- Check that the build on release<version> and verify artefacts they should be branded with like a voting candidate. Cancel and relaunch build otherwise
- Wait for the job to be finished.
- Keep the build
1.2 On your computer, once the build described in 1.1 above has succeeded:
- Download and extract the build artifacts, specifically, "(all files in ZIP)" for "dist/netbeans" and "dist/netbeans-platform". This gets us the IDE, source and binary, NBM modules, and platform source and binary.
Check the SHA512 checksums:
Code Block language bash theme Midnight find . -name '*.sha512' -execdir sha512sum --check '{}' \; #alternative for z in $(find . -name '*.sha512license'); do-exec cd $(dirname $z); sha512sum ./$(basename $z) --check --quiet; cd - >/dev/null; done
Sign the Release Files
Code Block language bash theme Midnight export GPG_EMAIL="YOU@apache.org"gpg -u $GPG_EMAIL --armor --output {}.asc --detach-sign {} \; # nbm/updates.xml and nbm/tasks.jar find . -name '*.zipjar' -exec gpg -u $GPG_EMAIL --armor --output {}.asc --detach-sign {} \; # Stop here if nbms are not going to be published find . -name '*.nbmxml' -exec gpg -u $GPG_EMAIL --armor --output {}.asc --detach-sign {} \;
Verify Signatures
Code Block language bash theme Midnight find . -name '*.gzasc' -exec gpg -u $GPG_EMAIL --armor --output-verify {}.asc --detach-sign {} \; # nbm licenses find . -name '*.license' -exec gpg -u $GPG_EMAIL --armor --output {}.asc --detach-sign {} \; # nbm/updates.xml and nbm/tasks.jar find . -name '*.jar' -exec gpg -u $GPG_EMAIL --armor --output {}.asc --detach-sign {} \; find . -name '*.xml' -exec gpg -u $GPG_EMAIL --armor --output {}.asc --detach-sign {} \;
Verify Signatures
Code Block language bash theme Midnight find . -name '*.asc' -exec gpg --verify {} \;
2. Verifying the Release by Checklist
- Go through the Apache Incubator Release Checklist
(whether a project is in the Apache Incubator or not, these items need to be checked since they're important for all Apache releases) - Check the Product version:
Start Apache NetBeans and check the Title and the Help > About Dialog - Check that the splash screen has been updated.
- Check that the user directory matches the release number.
- Check GPL License is present and need to be accepted:
- Start NetBeans with an empty User directory
- Open a Java SE project: installing nb-javac shall present GPL
- Start NetBeans with an empty User directory
- Create a new PHP project: installing Graal JS shall present GPL
3. Publishing them in the staging area
...
\;
2. Verifying the Release by Checklist
- Go through the Apache Incubator Release Checklist
(whether a project is in the Apache Incubator or not, these items need to be checked since they're important for all Apache releases) - Check the Product version:
Start Apache NetBeans and check the Title and the Help > About Dialog - Check that the splash screen has been updated.
- Check that the user directory matches the release number.
- Check GPL License is present and need to be accepted:
- Start NetBeans with an empty User directory
- Open a Java SE project: installing nb-javac shall present GPL
- Start NetBeans with an empty User directory
- Create a new PHP project: installing Graal JS shall present GPL
3. Publishing them in the staging area
Create an empty directory for the release then:
Code Block | ||||
---|---|---|---|---|
| ||||
svn checkout --depth immediates https://dist.apache.org/repos/dist/ apache-dist
cd apache-dist/dev && svn update --depth immediates netbeans
cd netbeans && svn update --set-depth infinity |
Publish to Staging Area
Code Block | ||||
---|---|---|---|---|
| ||||
svn rm netbeans-platform/* netbeans/*
mkdir netbeans-platform/$VERSION netbeans/$VERSION
# Copy the netbeans-platform and netbeans artifacts with checksums and signatures in place
svn add netbeans-platform/* netbeans/*
svn --username "<your-apache-username>" commit -m "Apache NetBeans $VERSION." |
Note 1: In the above $VERSION should be, for example, "12.3" (and not 12.3-vc or something similar), because then when we publish later to "release", we won't need to change the name.
Note 2: The above, i.e., pushing to svn, could take several hours.
4. Do the vote on the dev mailing list.
5. Creating tag for the Release:
Assuming the vote succeeded, we should tag the release, after voting, but not the voting candidates.
Go to your local git repository clone. Collect the git commit hash from the release build job.
Code Block | ||||
---|---|---|---|---|
| ||||
git fetch --all
git tag -a $VERSION -m "Apache NetBeans $VERSION." $HASH
git push origin $VERSION
# or if you've disabled upstream push
git push https://github.com/apache/netbeans.git $VERSION |
6. Releasing a Release
Assuming the vote succeeded, move the artefacts from "dev" to "release", which, on success, will automatically trigger mirroring:
Code Block | ||||
---|---|---|---|---|
| ||||
svn checkout --depth immediates https://dist.apache.org/repos/dist/ apache-dist cd apache-dist/dev# Go to the apache-dist directory which had been previously checked out in Step 4. cd release && svn update --depth immediates netbeans cd netbeans && svn update --set-depth infinity |
Publish to Staging Area
Code Block | ||||
---|---|---|---|---|
| ||||
svn rm netbeans-platform/* netbeans/* mkdir netbeans-platform/$VERSION netbeans/$VERSION infinity # Copysvn therm netbeans-platform and netbeans artifacts with checksums/* netbeans/* # need to keep LTS and signatureslatest innon-LTS place? svn# add netbeans-platform/* netbeans/* svn --username "<your-apache-username>" commit -m "Apache NetBeans $VERSION." |
Note 1: In the above $VERSION should be, for example, "12.3" (and not 12.3-vc or something similar), because then when we publish later to "release", we won't need to change the name.
Note 2: The above, i.e., pushing to svn, could take several hours.
4. Do the vote on the dev mailing list.
5. Creating tag for the Release:
Assuming the vote succeeded, we should tag the release, after voting, but not the voting candidates.
Go to your local git repository clone. Collect the git commit hash from the release build job.
Code Block | ||||
---|---|---|---|---|
| ||||
git fetch --all
git tag -a $VERSION -m "Apache NetBeans $VERSION." $HASH
git push origin $VERSION
# or if you've disabled upstream push
git push https://github.com/apache/netbeans.git $VERSION |
6. Releasing a Release
...
Use svn move or copy to copy the the artifact from the staging area
svn mv ../../dev/netbeans/netbeans-platform/$VERSION netbeans-platform/$VERSION
svn mv ../../dev/netbeans/netbeans/$VERSION netbeans/$VERSION |
- Go to the release version directories and rename the voting candidate artifacts to have the release version in their name.
- Adjust the name change in the checksum files (or recreate them)
- Doublecheck the checksums with: find . -name '*.sha512' -exec sha512sum -c {} \;
- Commit the changes from the apache-dist directory
7. Updating redirect for NetBeans Distribution Update Center
Once release is synchronized across all download mirrors it is necessary to update redirect for release modules to final location:
- Login to NetBeans virtual machine where redirect is configured: ssh <your_apache_id>@netbeans-vm1.apache.org
Become root using e.g. OTP MD5 online encryption: sudo /bin/bash
Code Block language bash theme Midnight
...
# Go to the apache-dist directory which had been previously checked out in Step 4.
cd release && svn update --depth immediates netbeans
cd netbeans && svn update --set-depth infinity
# svn rm netbeans-platform/* netbeans/* # need to keep LTS and latest non-LTS ?
# Use svn move or copy to copy the the artifact from the staging area
svn mv ../../dev/netbeans/netbeans-platform/$VERSION netbeans-platform/$VERSION
svn mv ../../dev/netbeans/netbeans/$VERSION netbeans/$VERSION
sudo /bin/bash cd /var/www/html/uc/ mkdir 11.1 cd 11.1/ curl https://dist.apache.org/repos/dist/release/netbeans/netbeans/11.1/nbms/updates.xml.gz -o updates.xml.gz echo ' RedirectMatch ^/uc/11.1/(.*)(\?.*)?$ http://www.apache.org/dyn/closer.lua?action=download&filename=netbeans/netbeans/11.1/nbms/$1' > .htaccess # Update the previous version UC - need to keep LTS and non-LTS! cd ../10.0/ echo 'RedirectMatch ^/uc/10.0/(.*)(\?.*)?$ https://archive.apache.org/dist/incubator/netbeans/incubating-netbeans/incubating-10.0/nbms/$1' > .htaccess vim updates.xml.gz
Modify updates.xml.gz file of previous release to contain: (how to handle LTS vs non-LTS?)
Code Block language xml theme Midnight <notification url="https://netbeans.apache.org/download/index.html">Apache NetBeans IDE 11.0 is available!</notification>
element in its <module_updates> root element.
NOTE: For accessing the NetBeans Virtual VM please see netbeans-vm.apache.org
8. Post Release Step
8.1 Git operation post release create PR for snapshot (example for 12.5)
git checkout release124
ant clean
ant build
ant gen-sigtests-release
git add -A
git stash
git checkout master
git checkout -b apis-nb125a1
git stash pop
git add -A
git commit -m "Snapshot of APIs as of 12.5"
# remove getPeer() calls
find . -name "*.sig" -exec sed -i '/java.awt.peer.ComponentPeer/{N;d;}' {} \;
# check git diff
git add -A
git commit --amen
8.2 Git operation post release merge delivery to master
(wip)
website
- Go to the release version directories and rename the voting candidate artifacts to have the release version in their name.
- Adjust the name change in the checksum files (or recreate them)
- Doublecheck the checksums with: find . -name '*.sha512' -exec sha512sum -c {} \;
- Commit the changes from the apache-dist directory
7. Updating redirect for NetBeans Distribution Update Center
Once release is synchronized across all download mirrors it is necessary to update redirect for release modules to final location:
...
Become root using e.g. OTP MD5 online encryption: sudo /bin/bash
Code Block | ||||
---|---|---|---|---|
| ||||
sudo /bin/bash
cd /var/www/html/uc/
mkdir 11.1
cd 11.1/
curl https://dist.apache.org/repos/dist/release/netbeans/netbeans/11.1/nbms/updates.xml.gz -o updates.xml.gz
echo ' RedirectMatch ^/uc/11.1/(.*)(\?.*)?$ http://www.apache.org/dyn/closer.lua?action=download&filename=netbeans/netbeans/11.1/nbms/$1' > .htaccess
# Update the previous version UC - need to keep LTS and non-LTS!
cd ../10.0/
echo 'RedirectMatch ^/uc/10.0/(.*)(\?.*)?$ https://archive.apache.org/dist/incubator/netbeans/incubating-netbeans/incubating-10.0/nbms/$1' > .htaccess
vim updates.xml.gz |
...
Modify updates.xml.gz file of previous release to contain: (how to handle LTS vs non-LTS?)
Code Block | ||||
---|---|---|---|---|
| ||||
<notification url="https://netbeans.apache.org/download/index.html">Apache NetBeans IDE 11.0 is available!</notification> |
element in its <module_updates> root element.
NOTE: For accessing the NetBeans Virtual VM please see netbeans-vm.apache.org
8. Post Release Step
(wip)
website
snapshot
merge delivery to master,
version increment
mail to + twitter
--
clean up old release on dist, github tag removal, free jenkins locked build
...