Skip to end of metadata
Go to start of metadata

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:

  1. 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).
  2. Check the Quality requirements of source code
    1. The SQALE index must be A between two releases 
    2. The SQALE remediation factor must not increase
    3. There should not be any blocker or critical violations
  3. Publish first release candidate (see bellow)
  4. Do extensive tests :
    1. Test all versions of Internet Explorer (including v.6)
    2. Test migration from previous release
      1. Technical upgrade is automatically tested by integration tests
      2. Export Nemo database and manually test migration
    3. Do sanity checks
    4. 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).
    5. Run performance tests
  5. Complete technical documentation (web services, new extension points)
  6. Upgrade http://nemo.sonarsource.org
  7. Wait for community's feedback
  8. Publish new release candidate and repeat tests as long as the release is not perfect.
  9. Publish the final release (see bellow).

How to publish the first release candidate

  1. Create a new GIT branch
    1. git checkout -b release-<final version, not suffixed by '-RC'>
  2. Create release version
    1. 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
  3. Upload the files target/checkout/sonar-application/target/sonar-<version>.* to webdav repository https://dav.codehaus.org/dist/sonar/

  4. Connect to https://nexus.codehaus.org and close the staging repository.
  5. Release the staging nexus repository if artifacts must be deployed into central repository.
  6. Push changes
    1. git push origin release-<version>
    2. git push --tags
  7. Increase version of master branch :
    1. git checkout master
    2. mvn versions:set -DgenerateBackupPoms=false -DnewVersion=<next SNAPSHOT version>
    3. git commit -am "Upgrade version to <next SNAPSHOT version>"
    4. git push
  8. Update the environment variable $SONAR_SNAPSHOT_VERSION of SonarSource CI server
  9. Send an email to dev@sonarsource.com
  10. Install RC on Dory

How to publish next release candidates

  1. Update the local GIT repository
    1. git checkout release-<final version, not suffixed by '-RC'>
    2. git pull origin release-<final version, not suffixed by '-RC'>
  2. Create release version
    1. 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
  3. Upload the files target/checkout/sonar-application/target/sonar-<version>.* to webdav repository https://dav.codehaus.org/dist/sonar/
  4. Connect to https://nexus.codehaus.org and close the staging repository.
  5. Release the staging nexus repository if artifacts must be deployed into central repository.
  6. Push changes
    1. git push origin release-<version>
    2. git push --tags

How to release final version

  1. Release new version in Jira
  2. Checkout the release branch
    1. git checkout release-<version>
  3. Set release version
    1. mvn versions:set -DgenerateBackupPoms=false -DnewVersion=<version>
    2. git commit -am "Release <version>"
  4. Deploy artifacts to maven repository
    1. mvn clean deploy -Prelease
  5. Upload the files sonar-application/target/sonar-<version>.* to the webdav repository https://dav.codehaus.org/dist/sonar/.
  6. Publish Javadoc to http://www.sonarsource.org/docs
    1. Execute the script subprojects/tools/upload-sonar-javadoc.sh located in SonarSource internal repository
  7. Connect to https://nexus.codehaus.org, close and release the staging repository.
  8. Tag and push to remote GIT repository
    1. git tag <version>
    2. git push origin releases
    3. git push --tags
  9. Merge master branch
    1. git checkout master
    2. git merge release-<version>. Be careful of conflicts of versions in pom files.
    3. git push
  10. 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.
  11. Upgrade http://nemo.sonarsource.org
  12. Update the download page, the homepage and the roadmap page
  13. Update the documentation, including Plugin versions matrix and upgrade guide
  14. Add the release to Update Center (hosted at SonarSource)
  15. Roll Integration Tests over (hosted at SonarSource)
  16. Post an announcement to the blog, to the mailing-lists announce@sonar.codehaus.org, user@sonar.codehaus.org and dev@sonar.codehaus.org
  17. Tweet the release
  18. Drink some champagne with all the team !
Labels: