How to release Petalslink projects

Requirements

  • A linux operating system (tested on Ubuntu only) with a bash shell
  • subversion package installed : sudo apt-get install subversion
  • maven package installed
  • xmlstarlet package installed : sudo apt-get install xmlstarlet

Release steps

This section describes the main steps of the release process script : 

  • Checkout svn copy of the project structure to release (for exemple svn trunk directory)
  • Extract dependencies of the project to release
  • Starting from the upper dependency, ask user for release info (need release?, release version?, next dev version?, etc.). SVN changes and previously released dependencies information is provided to help user during this step.
  • Once all information is collected, an automatic release process is launched. For all project dependencies, starting from the upper dependency, execute a concrete release:
  • The project and all its dependencies are released. Fix all poms to ensure that all internal dependencies are aligned on trunk version.
  • Ask for the creation of "meta-tag" (copy of the checkouted svn directory in its state after the release process). This "meta-tag" is useful for maintenance purposes.

Usage

  • Inform all developers that a release will be launched soon. No commit allowed during release process (if possible, block the commit to the other SVN users).
  • Check that you have a copy of all release bash scripts located into : https://svn.petalslink.org/svnroot/trunk/infra/tools/release/ (all release scripts need to be located into the same folder)
  • Launch the release script : release.sh PROJECT_NAMES URL_CHECKOUT 
    • PROJECT_NAMES : the list of all project names to release, separeted by ",". Project name pattern : groupID:artefactId. Exemple : org.ow2.petals:petals-enterprise
    • URL_CHECKOUT : URL of the svn basedir to checkout. This basedir need to included the projects to release and all its internal dependencies (also released during release process). Release will be performed on this checkouted directory. The checkouted sources will be placed into a subfolder of the folder from which you launch the release process, called "RELEASE_CHECKOUT".
    • Answer the questions about release info (the first part of the release process)
  • Once the release is performed, you could find released artifacts into petalslink maven repository. More, a subdirectory of the "RELEASE_CHECKOUT" directory, called "release", is created during this process and contains useful release information (global release changelog, released modules, release log).
  • Enjoy :-)

In case of failure

If the script fails in the course of the release process,

  • before beginning the automatic release process itself (that is to say during the checkout, the dependencies extraction or the questions to the user), just delete the local checkout directory (it is called RELEASE_CHECKOUT)
  • after beginning the automatic release process itself,
    • change the current directory to the directory of the project which fails (in the local checkout directory) and launch the rollback of the project release (mvn release:rollback)
    • realign all the dependencies of all the POM (in the local checkout directory) by executing the script . This script takes as argument, the path of the local checkout directory. It realigns the dependency versions which might be wrong in all the POM of the local checkout directory and commits the necessary corrections. This step is important because the projects of the trunk may not compile any more because of wrong dependency version.
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.