PhenoTips » Releases » Release Plan Documentation

Release Plan Documentation

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

Set up your identity

  • Make sure your git configuration has a proper username and email address: git config --global user.name; git config --global user.email
  • Create a GPG key if you don't already have one: gpg --gen-key
  • If git fails to find your secret key for signing the tag during the release process you can use git config user.signingkey xxx to specify the secret key to be used
  • Make sure gpg-agent is running, or you'll have to manually enter your GPG key passphrase literally hundreds of times during the push to Nexus phase below
    • If releasing from a remote machine over SSH, run export GPG_TTY=`tty` to make GPG use the right pin entry application, since by default it uses a GUI that won't work over SSH
  • Make sure you have an account on Nexus; ask Sergiu for one if you don't
  • Make sure you have an account on phenotips.org; make sure your account is in the "advanced" mode
  • Make sure you have your Nexus account configured in ~/.m2/settings.xml (put your own username and password in the file):
<settings>
 <servers>
   <server>
     <id>nexus.phenotips.org</id>
     <username>user</username>
     <password>pass</password>
   </server>
 </servers>
</settings>

Build the release

(The build process creates an .rpm distribution among other things, so make sure the build machine has an `rpmbuild` utility installed)

# Define a variable for the release project
export PROJECT=phenotips
# Define a variable for the release version
export VERSION=1.0-milestone-1
# Define a variable for the snapshot version
export SNAPSHOT_VERSION=1.0-SNAPSHOT
# Make sure you are up to date
git checkout master
git pull
git status
# There shouldn't be any commits ahead of origin/master
# Clean any uncommitted files
# WARNING: this will remove all untracked files! Make sure there isn't any important code left uncommitted!
# If you have such files and would like to keep it, create a new git clone instead
git clean -dxf
# Go to a release branch
git checkout -b release-${VERSION}
# Modify the <phenotips.version> property in the root pom. Don't modify <version>, that's done by maven
sed -i 's;<phenotips.version>.*</phenotips.version>;<phenotips.version>'"${VERSION}"'</phenotips.version>;' pom.xml
# Commit it
git commit -am "[release] Set the phenotips.version to the right value"
# Prepare the release:
mvn release:prepare -DreleaseVersion=${VERSION} -DdevelopmentVersion=${SNAPSHOT_VERSION} -Dtag=${PROJECT}-${VERSION} -Pfunctional-tests
# --------------------------
# Now would be a good time to smoke-test the built zip file
# --------------------------
# Sign the tag
git checkout ${PROJECT}-${VERSION}
git tag -d ${PROJECT}-${VERSION}
git tag -s -m "Tagging ${PROJECT}-${VERSION}" ${PROJECT}-${VERSION}
# Verify the signature used
git cat-file -p ${PROJECT}-${VERSION}
# Push the tag
git push origin ${PROJECT}-${VERSION}
# Push the release artifacts to Nexus
mvn release:perform -Pfunctional-tests
# Cleanup
git checkout master
git branch -D release-${VERSION}

Restarting release build in case of a failure

In case mvn release:prepare ... fails it is best to execute mvn release:clean and git reset --hard origin/master after fixing the problem and before another build attempt.

Also if a failure occurs after the release has been tagged in git locally, make sure to remove the tag before building again: git tag -d ${PROJECT}-${VERSION}

Availability

PhenoTips® is freely available under the terms of the the GNU Affero General Public License, version 3.0.

 Download the latest release
 Play with our demo
 Get the source code

Contact

 Ask for free support (by volunteers):
support@phenotips.org
 Inquire about commercial support:
info@gene42.com
 Follow us on twitter:
@phenotips

PhenoTips® is an exclusive trademark of Gene42 Inc.