Contains instructions to perform various release steps in the Release Plans.

Initial Backward Compatibility Check

This initial step checks if the previous release cycle, or more recent bugfix releases done since, have properly set the xwiki.compatibility.previous.version property in the top level POM of xwiki-commons (for the branch you are currently releasing).

For example, if the current release to be made is for 4.2-milestone-3 and, in the meanwhile, there have been released bugfix versions for 4.1 (4.1.4 being the latest released), you need to ensure that the value for xwiki.compatibility.previous.version is 4.1.4.

Verify JIRA issue

If there are opened JIRA issues for the version you are currently releasing (fixVersion is set to the current release), you have two options:

  1. The issue has no code committed yet (Commits tab shows nothing). In this case, you need to push the issue to the next development version. (e.g. fixVersion = 6.3-milestone-1 will be moved to fixVersion = 6.3-milestone-2)
  2. There is some code already committed (Commits tab is not empty). In this case, you need to contact the assigned developer of the issue and find out if the committed code is complete:
    1. If the code is complete, you can close the issue (or ask the dev to do it)
    2. If the code is not complete, you can close the issue and ask the dev to create a new issue for the remaining work to be done for the next version.

In all cases, all opened issues must be closed before the release can be done.

Log on Release machine

# Get on the maven CI master machine
[email protected]:~ssh [email protected]

# Get on the agent machine
[email protected]:~a1-1

Set up your identity

The first time

  • Configure your Github profile to add the SSH key of the agent so that the commits can be pushed to Github with your user (To get the agent SSH key, do cat ~/.ssh/id_dsa.pub). To verify it works, do the following on the agent machine: ssh -T [email protected]. It should reply with Hi <your user id>! You've successfully authenticated, but GitHub does not provide shell access..
  • Create your own GPG key if you don't already have one: gpg --gen-key
  • Import your GPG key:
    • On your local computer run: gpg --list-secret-keys
    • Export your key in a secret.key file: gpg --export-secret-keys «keyID» > secret.key where keyID is the 8 characters long hexadecimal string on the sec line
    • Copy the secret.key file to the agent machine (you may need to copy to maven.xwiki.org first and then to agent-1-1)
      • From your local computer, upload the key to maven.xwiki.org: scp secret.key [email protected]:/home/maven
      • From maven.xwiki.org (/home/maven): scp secret.key [email protected]:/home/hudsonagent
        • You can remove the key from maven.xwiki.org after you have uploaded it to agent-1-1.
        • In case the IP address of the agent written above is no longer correct, just connect to the maven CI master machine (as shown in the Log on Release machine section above), run the command alias and get the IP address from the line containing the "a1-1" alias (the one used to connect to the agent). It looks like alias a1-1='ssh [email protected]'. After that, please update this page emoticon_smile
    • On the agent machine, run gpg --import secret.key
      • Don't leave the key file on the agent or the maven machines. Run rm secret.key on both locations.
  • You need to have a .gitconfig.<yourusername> file. You can do that by copying one of the existing gitconfig file
  • Make sure your gitconfig file has the key signingkey in the [user] section (the value is your key id which you can get with gpg --list-secret-keys).
  • Copy your .gitconfig.<yourusername> file as the main gitconfig file: cp .gitconfig.<yourusername> .gitconfig

The other times

  • Configure your Github profile to add the SSH key of the agent so that the commits can be pushed to Github with your user (To get the agent SSH key, do cat ~/.ssh/id_dsa.pub). To verify it works, do the following on the agent machine: ssh -T [email protected]. It should reply with Hi <your user id>! You've successfully authenticated, but GitHub does not provide shell access..
  • Make sure previous release manager did not left his GPG key
    gpg --delete-secret-and-public-keys `gpg --list-secret-keys | grep ^sec | cut -d/ -f2 | cut '-d ' -f1`
  • Import your GPG key, run gpg --import secret.key
  • Copy your .gitconfig.<yourusername> file as the main gitconfig file: cp .gitconfig.<yourusername> .gitconfig

Update Release scripts

# Update the release script
[email protected]:~cd xwiki-dev-tools ; git pull --rebase ; cd ..
Do a git status to verify that there are not any committed but not pushed stuff lying around...

Update Translations

When you release a .x version (bug fix release), be very careful when you update translations because the new ones might concern new stuff introduced in the master branch. The issue is that the translations wiki does not support branches.

Perform the following steps:

  • Edit the release-translations.sh file to set branch, if needed (e.g. do this only if you are performing a bugfix release like 6.1.1 on the stable-6.1.x branch and you are not working on master, which is 6.2-SNAPSHOT).:
    [email protected]:~vim release-translations.sh
  • Move to xwiki-trunks:
    [email protected]:~cd releases/xwiki-trunks/
  • Download the translations:
    [email protected]:~/releases/xwiki-trunks~/release-translations.sh
  • Review the changes for anything amiss, like spam in translations.
    • You need to go through each project (xwiki-platform, xwiki-enterprise, xwiki-rendering, xwiki-commons, etc)
    • Do a git status to spot changes (and the list of updated languages).
      • Do a git diff and visually review modified translation keys and spot problems (like spam). Do not spend too much time here, a quick scan is enough to spot obvious problems.
      • For new (untracked) translation files, you can view them individually with a standard cat <filePath> command.

        In case there are new translation files for GWT modules (xwiki-platform-gwt-user or xwiki-platform-wysiwyg-client), those languages need to be added to the corresponding GWT module descriptors:

        ## For xwiki-platform-gwt-user
        vim xwiki-platform-core/xwiki-platform-gwt/xwiki-platform-gwt-user/src/main/resources/org/xwiki/gwt/user/User.gwt.xml
        ## For xwiki-platform-wysiwyg-client
        vim xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-client/src/main/resources/org/xwiki/gwt/wysiwyg/Wysiwyg.gwt.xml

        ...and add the new language code to the existing list defined in the locale extended-property that looks similar to this:

        <extend-property name="locale" values="ca,cs,da,de,es,fr,it,lv,nl,pt_BR,ru,sk,sv,tr,zh,zh_TW" />
      • No need to do a git add at this point since it will be done for all projects below.
    • Collect the list of updated languages by looking at the language code of the modified/new translation files and update the Release Notes in the Translations section with these language codes.
  • Commit the translation changes:
    [email protected]:~/releases/xwiki-trunks~/release-translations.sh commit
Be patient, this process takes some time

Build the release

When releasing a Release Candidate (e.g. 6.2-rc-1), make sure that, when asked What is the next SNAPSHOT version?, you do not increment the snapshot version (i.e. you answer 6.2-SNAPSHOT instead of 6.3-SNAPSHOT or whatever suggestion you have). This is because the next step will ask you to create a stable branch where the final version (if this is the last RC we`re doing) will be released and there we need to keep the SNAPSHOT version to the current one.

If you have created the stable branch and are asked What is the next master version?, you will now increment the snapshot version (i.e. answer 6.3-SNAPSHOT) so that the master branch can move to the next development version.

Tip: Because the build process is a lenghty one (currently around 2 hours), it is a good idea to use the screen linux command. This is most helpful in case your Internet connection or electrical power drops. However, it is not in any way mandatory to use screen during the release.
# Perform the release from the release sources
[email protected]:~/releases/xwiki-trunks~/maven-release.sh

Release Candidate releases

Depending on the kind of release you have there might be some more work to do:

  • (only for RC) update the continuous integration jobs to build the new stable version that you have just created trough the release of a RC version.

Update the continuous integration jobs

At this point, you have just created a new stable-x.y.z branch in the source repository where your version will achieve final version and will continue stabilizing trough bugfix versions, while the main development branch is done on the master branch.

However, the continuous integration jobs that are supposed to build the stable-x.y.z branch are not yet set up. They are still configured to build the previous stable branch (stable-x.y-1.z or stable-x-1.y.z). This means that you need to add the new jobs. Fortunately we have an automated script for this emoticon_wink

Go to http://ci.xwiki.org/scriptler/runScript?id=copy-jobs.groovy , fill the parameter values and click on Run at the bottom right. 

Make sure that the script properly copies build triggers. Inspect the execution logs of the script and fix any missing build triggers in the copied jobs.

In case of failure while building

In our examples below, we are assuming that the xwiki-platform project just failed during the release, while the xwiki-commons and xwiki-rendering were successfullt released.

Go to the corresponding top level module, clean up and fix the build problem:

[email protected]:~/releases/xwiki-trunkscd xwiki-platform
# Note: Make sure to set the VERSION environment variable to the version you are working to release, otherwise the restart-release script will fail.
[email protected]:~/releases/xwiki-trunksexport VERSION='4.2-milestone-3'
[email protected]:~/releases/xwiki-trunks/xwiki-platform~/restart-release.sh

To resume the build from the top level module that previously failed, you need to edit the maven-release.sh script and comment out the previously successfully released top level modules.

[email protected]:~/releases/xwiki-trunks/xwiki-platformcd ..
[email protected]:~/releases/xwiki-trunksvim ~/maven-release.sh

Go to the end of the maven-release.sh file and scroll up, until you reach this section:

# Wrapper function that calls release_project for each XWiki project in order: commons, rendering, platform, enterprise, manager.
# This is the main function that is called when running the script.
function release_all() {
...

Inside this method, comment out the previously successful top level projects and leave uncommented the top level projects that still need to be released, including the one we are resuming from. Remember that in our example, we are resuming from xwiki-platform but xwiki-commons and xwiki-rendering were already successfully released, so we are skipping them:

...
 echo              "*****************************"
 echo -e "\033[1;32m    Releasing xwiki-commons\033[0m"
 echo              "*****************************"
#  release_project xwiki-commons
 echo              "*****************************"
 echo -e "\033[1;32m    Releasing xwiki-rendering\033[0m"
 echo              "*****************************"
#  release_project xwiki-rendering
 echo              "*****************************"
 echo -e "\033[1;32m    Releasing xwiki-platform\033[0m"
 echo              "*****************************"
  release_project xwiki-platform
 echo              "*****************************"
 echo -e "\033[1;32m    Releasing xwiki-enterprise\033[0m"
 echo              "*****************************"
  release_project xwiki-enterprise
...

Go back to the build step and re-launch the maven-release.sh script to resume from where we left off.

Clean up identity

# Git identity
[email protected]:~/releases/xwiki-trunkscd
[email protected]:~cp .gitconfig.default .gitconfig

# GPG key
[email protected]:~gpg --delete-secret-and-public-keys `gpg --list-secret-keys | grep ^sec | cut -d/ -f2 | cut '-d ' -f1`

# Local changes to the release-scripts (maven-release.sh, user/password in release-translations.sh, etc.)
[email protected]:~cd xwiki-dev-tools
# Double check that you are not removing any improvement you have made to the release scripts that should be committed instead ;)
[email protected]:~/xwiki-dev-toolsgit status
[email protected]:~/xwiki-dev-toolsgit diff
[email protected]:~/xwiki-dev-toolsgit checkout .

error Then don't forget to remove the Agent's SSH Key from your Github Account.

Generate Backward Compatibility Report

The Backward Compatibility report is automatically generated in the Release Notes page by the {{backwardCompatiblityReport version="<version>"/}} macro which does the following:

  • Gets the revapi ignores from the pom.xml of xwiki-commons, xwiki-rendering and xwiki-platform GitHub repositories and store them in an xobject in the Release Note page. If you wish to regenerate the content from GitHub just delete this xobject.
  • Displays the ignores

If you're releasing a final version, perform the following operations on your local machine:

  • Checkout the tag you've just released for all Git repositories having java code (xwiki-commons, xwiki-rendering, xwiki-platform)
    cd xwiki-commons
    git fetch --tags
    # If you`re releasing 4.2
    git checkout xwiki-commons-4.2
  • Remove the revapi ignores from the branch and also on master in order to start fresh the next version.
    • You have to remove ignores from 3 locations:
      • xwiki-commons/xwiki-commons-core/pom.xml
      • xwiki-rendering/pom.xml
      • xwiki-platform/xwiki-platform-core/pom.xml
    • Commit the removals:
      # Stash the changes you just did on the tag
      git stash
      # Switch to your branch
      # Assuming you are releasing 6.2.3. If you were releasing 6.3 (a final version), commit both on branch and master
      git checkout master
      # Pop, commit and push your previous changes to master
      git stash pop
      git commit -a -m "[misc] Removed revapi ignores from the previous version"
      git push origin master
      # Switch to your release's branch
      git checkout stable-6.2.x
      # Cherry-pick the changes from master and push to the branch
      git cherry-pick -x master
      git push origin stable-6.2.x
  • Checkout master for xwiki-commons and edit the top level pom.xml to update the xwiki.compatibility.previous.version. Set the value to be your release you've just done.
  • Checkout the xwiki-commons branch corresponding to your release (for example if you're releasing 4.1.3, checkout stable-4.1.x) and cherry-pick the commit you`ve just pushed to master. (git cherry-pick -x master; git push origin stable-4.1.x)

Push to OW2

  • Log on the Jenkins master machine: ssh [email protected]
  • Go to the release script directory: cd xwiki-release-scripts
  • Create a Release notes file: vim releasenotes-<version>.txt (e.g. releasenotes-6.1-milestone-2.txt)
    This milestone contains a new mail API and module to replace the old mailsender plugin, Flamingo skin and Extension Manager improvements as well as various performances improvements and bug fixes.

    Full release notes available at http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki61M2
  • Upload to OW2 with ./push-release.sh push_ow2 (Follow instructions)
    • In case there is a problem during the upload and some of the files are not uploaded correctly, you can repeat this step to properly upload all the files.
    • You will need an OW2 account with admin rights on the XWiki project for this step
    • You may experience an "Could not chdir to home directory ... No such file or directory" error message if your account is just minutes old. If so, give it about 10-20 minutes for the new account to properly be created. It may also help (though this is just guesswork based on personal experience) if you register a public SSH key in the account management. Repeat the upload step until the files are all uploaded.
  • Create the release on OW2 with: ./push-release.sh update_ow2 (Follow instructions) The OW2 forge API has been broken so it does not fully work when pushing distribution files, you will have to do it by hand on http://forge.ow2.org/project/admin/showreleases.php?package_id=208&group_id=170 until we find a way to fix it emoticon_unhappy
  • Verify all is ok by going to the XWiki project page on OW2. Specifically, verify that the pushed files can be downloaded before continuing with the release process as otherwise end users will get an error when trying to download XWiki.
After update_ow2, OW2 has cron jobs that runs regularly. You need to test the files are available on http://download.forge.ow2.org/xwiki/ before proceeding further.

News on OW2

  • Publish the news on OW2 with: ./push-release.sh announce_ow2 (Follow instructions)
  • Verify all is ok by going to the XWiki project page on OW2

Blog post on xwiki.org

Create a new blog post on xwiki.org. You can use the same text that you`ve used in the OW2 release notes or otherwise have a look at the previous release blog posts for inspiration.

Announcement Mail

  • Collect the list of code contributors for this release by running the following command on each branch that has been released (xwiki-commons, xwiki-rendering, xwiki-platform and xwiki-enterprise):
    > git fetch --tags
    > git log --pretty=format:"%an" <previousTag>..<nextTag> | sort -u
    ## For instance:
    > git log --pretty=format:"%an" xwiki-commons-7.2-milestone-1..xwiki-commons-7.2-milestone-2 | sort -u
    > git log --pretty=format:"%an" xwiki-rendering-7.2-milestone-1..xwiki-rendering-7.2-milestone-2 | sort -u
    > git log --pretty=format:"%an" xwiki-platform-7.2-milestone-1..xwiki-platform-7.2-milestone-2 | sort -u
    > git log --pretty=format:"%an" xwiki-enterprise-7.2-milestone-1..xwiki-enterprise-7.2-milestone-2 | sort -u
    ## For final versions:
    > git log --pretty=format:"%an" xwiki-platform-7.2..xwiki-platform-7.3 | sort -u

    Try to remove duplicates and sort alphabetically.

  • Send the announcement email to the users and devs list
  • Example email:
    • Subject: [ANN] XWiki <version> released
    • Content:
      The XWiki development team is proud to announce the availability of XWiki <version>.
      <short summary>

      You can download it here: http://www.xwiki.org/xwiki/bin/view/Main/Download

      Make sure to review the release notes:
      http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki<short version>

      The following people have contributed code to this release (sorted alphabetically):

      <code contributors>

      Thanks for your support
      -The XWiki dev team

Announce on Twitter

To announce the new release on Twitter using XWiki.org`s account. Use the following type of text:

[email protected]:~$ twidge update "#XWiki 7.3 Release Candidate 1 has been #released! Check it out: http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki73RC1"

Publish to Maven Central

XWiki Commons and XWiki Rendering need to be published to Maven Central. To do so we use Sonatype's sync. The strategy is to upload to the XWiki Staging repo on Sonatype's Nexus, to check the staged repo and then to promote it.

In order to be able to upload to Sonatype's Nexus you'll need to create an account on http://issues.sonatype.org and then ask for publish rights (if you don't have them already) by posting a comment to https://issues.sonatype.org/browse/OSSRH-2099 .

  • Add the following in your settings.xml:
      <server>
        <id>sonatype-nexus-staging</id>
        <username>userid</username>
        <password>password</password>
      </server>
  • Add passphrase in settings.xml or pass it on command line using -Dgpg.passphrase=...:
    ...
       <profile>
         <id>xwiki</id>
         <properties>
           <gpg.passphrase>password</gpg.passphrase>
         </properties>
    ...
     
  • in xwiki-commons and in xwiki-rendering, checked out the correct tag
    git pull --rebase --tags
    # If you`re releasing xwiki-commons-7.0
    git checkout xwiki-commons-7.0
  • in xwiki-commons and in xwiki-rendering, after having checked out the correct tag, run:
     mvn clean deploy -Prelease,legacy,standalone,integration-tests -DaltDeploymentRepository=sonatype-nexus-staging::default::https://oss.sonatype.org/service/local/staging/deploy/maven2 -DskipTests=true -Dxwiki.checkstyle.skip=true
  • Publish your public GPG key, if you have not already done so: gpg --keyserver hkp://pool.sks-keyservers.net --send-key <keyID>
  • Then log in https://oss.sonatype.org/ and perform the release steps as indicated on Sonatype's synchro doc.

Rebuild Debian Distribution

The XWiki Debian distribution is automatically rebuilt every day using a crontab on maven.xwiki.org.

However, in order for the Debian distribution to be ready when we announce a new version, it's a good thing to force rebuild it.

This is achieved by logging on maven.xwiki.org with the maven user. Then run the script.

/home/maven/xwiki_scanpackages.sh
Be warned, this process takes some time (1.5h+) and should be done with the screen command.

Force Extensions Update

In order to have up to date versions on http://extensions.xwiki.org you should trigger the Batch importer scheduler.

However before you do so, make sure to mute the IRC channel to not spam it:

/mode +q xwikibot

And don't forget to unmute it once the release is over:

/mode -q xwikibot
Tags:
Created by Vincent Massol on 2012/07/13 15:39
    

Get Connected