Skip to main content
System StatusContact Support
VersionOne Community

Using CommitStream with Subversion

This feature is available in Catalyst, Enterprise, and Ultimate editions.

editions-ceu.png

Overview

Learn how to integrate CommitStream with your Subversion version control system.

Pre-Requisites

The following must be considered In order for CommitStream to function properly when using Subversion

  • Your Subversion server must be able to communicate with the CommitStream host (https://commitstream.v1host.com)

  • If using VersionOne Lifecycle on-premise, your Lifecycle instance must be able to communicate with the CommitStream host 

  • If using a Windows-based Subversion server, Powershell ver 4.0 or greater is required

  • If using a Linux-based Subversion server, Bash ver 4.0 or greater is required

  • In order to follow CommitStream links for commits or repositories, the network where your Subversion server is located must be accessible

Configuring Subversion

The following steps can be used for both Windows and Linux based Subversion servers.

  1. Go to Admin > DevOps CommitStream.

  2. Click on the Subversion VCS icon.

  3. Enter the URL of the desired Subversion server and click the "Add" button.

  4. Once the repository has been added, the "Download" area on the right hand side will offer the "commit-event" file download. Download the file for the OS family being used on your Subversion server.

  5. Once the download is complete, take the "commit-event" file ("commit-event.ps1" for windows or "commit-event.sh" for Linux) and place it on the repository's "hooks" folder.
  6. In order for commit ID links created by CommitStream to work propertly, edit the "commit-event" file at line 15 to include the base URL for the repository in question AND the Subversion revision path ("/r") in the following format: "<subversion domain>/<subversion repository name>/<revision path>". This may vary depending on the Subversion server product you are using so be sure to test it prior to use in a production environment.

    Example:

Windows: 

$html_url = "http://acmecorp.local/MySubversionRepository/PathToRevision"

Linux

 HTML_URL="http://acmecorp.local/svn/MySubversionRepository/!svn/bc"
  1. Download the "post-commit" file and place it on your "hooks" folder ("post-commit.bat" for windows or "post.commit" for Linux)

If you already have a "post-commit" file in place, add the following values to it:

Windows:

ECHO OFF
SET REPOS=%1
SET REV=%2
SET TXN_NAME=%3
SET DIR=%REPOS%/hooks
Powershell.exe -executionpolicy remotesigned -File  %DIR%/commit-event.ps1 %REPOS% %REV%

Linux:

#!/bin/bash
REPOS="$1"
REV="$2"
"$REPOS"/hooks/commit-event.sh "$REPOS" "$REV"

 

After this setup is done, CommitStream will receive the commit data from your Subversion repo and display it in VersionOne Lifecycle.

 

  • Was this article helpful?