Setting up your external repository for release

There is only one thing you need to do as a repository maintainer: add new source control _rules to the appropriate rosdistro files.

Motivation

When a stack is released, our scripts need to checkout the code, build it, and then create tags for that release. In order to automate this process, our system needs to know:

  • where the code for your stack is developed
  • where to create tags for releases

We use _rules to specify this information for release. Here is an example:

  ros-pkg-trunk:
    svn: {dev: 'https://code.ros.org/svn/ros-pkg/stacks/$STACK_NAME/trunk', distro-tag: 'https://code.ros.org/svn/ros-pkg/stacks/$STACK_NAME/tags/$RELEASE_NAME',
      release-tag: 'https://code.ros.org/svn/ros-pkg/stacks/$STACK_NAME/tags/$STACK_NAME-$STACK_VERSION'}

The above rule, called ros-pkg-trunk, tells our release system several pieces of information:

  • the code is stored in SVN
  • where the code is released from (dev)

  • where to create a version-specific tag (e.g. tags/common_msgs-1.2.1)

  • where to create a distro-specific tag (e.g. tags/cturtle)

These rules makes use of variables like $STACK_NAME, $STACK_VERSION, and $RELEASE_NAME so that they can be used for multiple stacks.

Which rosdistro files?

We store the .rosdistro files in https://code.ros.org/svn/release/trunk/distros. There is one .rosdistro file for each release (e.g. cturtle.rosdistro, unstable.rosdistro).

For each .rosdistro file, you will need to add a rules section for your repository.

Where in the file?

If you look at the top of release/distros/unstable.rosdistro, you will see a _rules: section. Only add your rules once to this top-level section. There are lower-level _rules sections for each stack that can override these on a per-stack basis. Do not worry about these.

_rules:
  ros-1.0:
     ... LOTS OF RULES ...
  wg-ros-pkg-trunk:
    svn: {dev: 'https://code.ros.org/svn/wg-ros-pkg/stacks/$STACK_NAME/trunk', distro-tag: 'https://code.ros.org/svn/wg-ros-pkg/stacks/$STACK_NAME/tags/$RELEASE_NAME',
      release-tag: 'https://code.ros.org/svn/wg-ros-pkg/stacks/$STACK_NAME/tags/$STACK_NAME-$STACK_VERSION'}

  *ADD YOUR RULES HERE*

release: cturtle

How to specify?

Please follow the _rules documentation to create your own rules.

Troubleshooting

If you're having trouble specifying your rules, here are some tips:

  1. The format is YAML, which is documented here.

  2. You can validate your YAML by executing (there should be no output if it validates):

python -c "import yaml; yaml.load(open('yourfilename.rosdistro'))"
  1. YAML uses spaces, not tabs. You're best off doing a copy and paste of existing rules.

Wiki: release/Setup/Repository (last edited 2012-01-31 17:28:27 by KenConley)