Requirements
Maven 2.2.1
Only this version is currently supported.
GPG key
Before releasing for the first time you have to generate a GPG key and publish it.
- Download GPG from http://www.gnupg.org/download/, follow the instructions and install it to your system. Verify your gpg installation by running gpg with the version flag, i.e. gpg --version
- Execute gpg --gen-key and answer the questions. Most of the time you can use the default.
- Execute gpg --list-sigs "your real name" && gpg --armor --export "your real name" and visit http://pgp.mit.edu/ to distribute your public key, so users can verify your files. This webpage contains a form where you have to copy your key.
- Update https://github.com/SonarSource/sonar/blob/master/KEYS by expanding this file with your key
Maven settings
Add your codehaus credentials to maven settings. Edit the file ~/.m2/settings.xml and add the server :
SSL certificate
The Codehaus SSL certificate must be available into the Java Virtual Machine :
- Download startssl-CA.pem and startssl-Intermediate.pem from this page.
Execute the command for both certificates (password is changeit):
Add this to a profile in ~/.m2/settings.xml, with you gpg key :
Or complete MAVEN_OPTS (but the first solution is better) with:
Procedure
The following steps should be run chronologically:
- All the JIRA issues have been tested by their owner and are closed. Integration tests are added and of course pass with all the supported databases (Derby, Mysql, Oracle, Postgresql, SQLServer).
- Check the Quality requirements of source code:
- The SQALE index must be A between two releases
- The SQALE remediation factor must not increase
- There should not be any blocker or critical violations
- Publish first release candidate (see bellow)
- Do extensive tests :
- Test all versions of Internet Explorer (including v.6)
- Test migration from previous release
- Technical upgrade is automatically tested by integration tests
- Export Nemo database and manually test migration
- Do sanity checks
- Run non-regression tests : launch previous version and version under test. Analyze commons-logging and commons-collection in both environments and compare results (homepage, dashboard, drilldowns, timemachine, clouds, hotspots, code viewers, configuration).
- Run performance tests
- Complete technical documentation (web services, new extension points)
- Upgrade http://nemo.sonarsource.org
- Wait for community's feedback
- Publish new release candidate and repeat tests as long as the release is not perfect.
- Publish the final release (see bellow).
How to publish the first release candidate
- Create a new GIT branch
git checkout -b release-<final version, not suffixed by '-RC'>
- Create release version
- Execute the following command and type answers like: release=2.11-RC1, tag=2.11-RC1, next dev version=2.11-SNAPSHOT
mvn release:prepare release:perform -Prelease -Darguments=-Dgpg.passphrase=thephrase
- Execute the following command and type answers like: release=2.11-RC1, tag=2.11-RC1, next dev version=2.11-SNAPSHOT
Upload the files
target/checkout/sonar-application/target/sonar-<version>.*to webdav repository https://dav.codehaus.org/dist/sonar/- Connect to https://nexus.codehaus.org and close the staging repository.
- Release the staging nexus repository if artifacts must be deployed into central repository.
- Push changes
git push origin release-<version>git push --tags
- Increase version of master branch :
git checkout mastermvn versions:set -DgenerateBackupPoms=false -DnewVersion=<next SNAPSHOT version>git commit -am "Upgrade version to <next SNAPSHOT version>"git push
- Update the environment variable $SONAR_SNAPSHOT_VERSION of SonarSource CI server
- Send an email to dev@sonarsource.com
- Install RC on Dory
How to publish next release candidates
- Update the local GIT repository
git checkout release-<final version, not suffixed by '-RC'>git pull origin release-<final version, not suffixed by '-RC'>
- Create release version
- Execute the following command and type answers like: release=2.11-RC2, tag=2.11-RC2, next dev version=2.11-SNAPSHOT
mvn release:prepare release:perform -Prelease
- Execute the following command and type answers like: release=2.11-RC2, tag=2.11-RC2, next dev version=2.11-SNAPSHOT
- Upload the files
target/checkout/sonar-application/target/sonar-<version>.*to webdav repository https://dav.codehaus.org/dist/sonar/ - Connect to https://nexus.codehaus.org and close the staging repository.
- Release the staging nexus repository if artifacts must be deployed into central repository.
- Push changes
git push origin release-<version>git push --tags
How to release final version
- Release new version in Jira
- Checkout the release branch
git checkout release-<version>
- Set release version
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=<version>git commit -am "Release <version>"
- Deploy artifacts to maven repository
mvn clean deploy -Prelease
- Upload the files
sonar-application/target/sonar-<version>.*to the webdav repository https://dav.codehaus.org/dist/sonar/. - Publish Javadoc to http://www.sonarsource.org/docs
- Execute the script subprojects/tools/upload-sonar-javadoc.sh located in SonarSource internal repository
- Connect to https://nexus.codehaus.org, close and release the staging repository.
- Tag and push to remote GIT repository
git tag <version>git push origin releasesgit push --tags
- Merge master branch
git checkout mastergit merge release-<version>. Be careful of conflicts of versions in pom files.git push
- Wait for the maven plugin to be published into the Maven central repository : http://repo1.maven.org/maven2/org/codehaus/sonar/sonar-maven-plugin/. Then the release can be made official.
- Upgrade http://nemo.sonarsource.org
- Update the download page, the homepage and the roadmap page
- Update the documentation, including Plugin versions matrix and upgrade guide
- Add the release to Update Center (hosted at SonarSource)
- Roll Integration Tests over (hosted at SonarSource)
- Post an announcement to the blog, to the mailing-lists announce@sonar.codehaus.org, user@sonar.codehaus.org and dev@sonar.codehaus.org
- Tweet the release
- Drink some champagne with all the team !
