Install a Subversion adapter on Windows

Install a Subversion adapter as a post-receive hook on Windows.

Minimum requirements:
This procedure assumes that you have installed CollabNet Subversion Edge, version 4.0 or higher, although other Windows distributions can be similarly configured. Each external Subversion repository you wish to monitor with TeamForge Orchestrates requires the installation of a customized post-commit hook script as follows.

Install Subversion post-commit hooks

  1. Download the Orchestrate-svn-adapter-[version].zip adapter file from the TeamForge Orchestrate Community web site and unpack it inside your repository's hooks directory. For example, if your repository's hooks directory is located at C:\csvn\repositories\my_repo\hooks :

    cd C:\csvn\repositories\my_repo\hooks

    # Download the zip file to the current location

    unzip Orchestrate-svn-adapter-1.0.zip

    This will unpack the following into your hooks directory:
    • LICENSE.txt
    • README.txt
    • configdefaults.py
    • configwrapper.py
    • orchestrate_commit_gate_hook.py
    • orchestrator_commit_gate_hook_snippet.sh
    • pika/
    • post-commit.bat.sample
    • post_commit_orc_publish_amqp.conf.sample
    • post_commit_orc_publish_amqp.py

Configuration

  1. In a web browser, log into TeamForge Orchestrate as a privileged Orchestrate user and edit (or add) the relevant Commit source you wish to associate with this Subversion repository.

    Pipelines > Edit (desired Pipeline) > Select a Review Step > Edit the Source

  2. On the Edit Source screen, locate the section titled "Adapter Configuration Information" and copy all values; these values are used later in the configuration process.
  3. Copy post_commit_orc_publish_amqp.conf.sample to post_commit_orc_publish_amqp.conf.
  4. Edit post_commit_orc_publish_amqp.conf and modify options for your specific installation, for example:
    Logging section
    • filename — Full path to the desired log file, for example, C:\Temp\post-commit.log.
      Note: Ensure that the log file exists, or create it, before proceeding to the next step.
    • level — The logging level, which is one of these: debug , info, warning, error, or critical.
    svnlook section
    • svnlook — The path to your svnlook executable, for example, C:\csvn\bin\svnlook.exe.
    RabbitMQ (amqp) section
    • host — The hostname of the amqp server. Copy and paste the hostname from the Queue Server value from the Edit Source screen in TeamForge Orchestrate.
    • port — The port number of the amqp server (default is 5672). Copy and paste the port number the Queue Server value from the Edit Source screen in TeamForge Orchestrate.
    • username— Username used to access the amqp server. Copy and paste the queue username value from the Edit Source screen in TeamForge Orchestrate.
    • password — Password used to access the amqp server. Copy and paste the queue password value from the Edit Source screen in TeamForge Orchestrate.
    A RabbitMQ server is optionally set up during the installation process. The installation process sets a default password for the "orchestrate" user and stores it for reference in the following file on the RabbitMQ host (root access required):
    /opt/collabnet/rabbitmq/.rabbit_passwords
    TeamForge Orchestrate section
    • source_association_key — key provided by TeamForge Orchestrate. Copy and paste the source association key value from the Edit Source screen in TeamForge Orchestrate. For more on association keys, see Source association keys.

Activate post-commit hook

  1. Copy post-commit.bat.sample to post-commit.bat.
  2. Edit post-commit.bat for your specific installation: set PYTHON_EXE to the full path to python.exe executable. For CollabNet Subversion Edge, this is typically C:\csvn\Python25\python.exe