Add and edit repositories

Tip: Add and edit repositories using the ALI Configuration wizard while configuring a related build job (recommended), or manually as described below.

If you are configuring repositories manually, it is still recommended to start by configuring a related build job, as described in Add and edit build configurations.

  1. Click Configuration and either Code or ALI Summary.

  2. Do one of the following:

    • To add a new repository, click Add SCM Repository.

    • To edit a repository, click the repository name.

    The New SCM Repository or repository details page opens.

  3. Add or edit the repository connection and authentication settings.

    See one of the following tables, depending on your repository type:

    SVN Properties Comments
    Connection & Authentication details

    Enter the server's connection details.

    The Location address must point to the actual root of the repository.

    To configure 2-way SSL (client certificate authentication), you must select a certificate and enter your encryption passphrase.

    Tip: If the URL for your SVN repository has an unknown root, you can find the root by entering "svn info <URL>" in the command line.

    Diff template/ File template

    The template for the address to use to access the diff link pages between revisions of a given code document or viewing the content of a given file. For details on diff links, see Configure the links for an external repository viewer.

    Note: If you are using Agile Manager's internal repository viewer, leave these properties blank.

    Batch size The number of revisions to include when uploading data from your SVN repository.
    Initial revision The number of the earliest revision to upload from your SVN repository.

    After entering the connection information, click Validate Configuration to check the connection.

    CVS Properties Comments
    Connection & Authentication details

    Enter the server's connection details.

    The alias property must be the full path to the server, including the CVSROOT property, exactly as it is configured in your build system. For example, you could enter the CVSROOT property as :pserver:username:password@host/cvsrepo.

    The CVSROOT property is required for the pserver protocol.

    CVS Protocol

    The way of connecting to the CVS repository.

    Note: You must define the pserver protocol to begin uploading change sets.

    CVS Root The address of the root directory for the CVS repository. You must use the following format: [:protocol:][[<username>[:<password>]]][@<servername>][:<serverpath>]
    Commit interval The maximum number of commits to include in a single change set uploaded to Agile Manager.
    Initial date time

    The earliest date from which to begin uploading commits from a CVS repository.

    Note: You must define the initial date and time to begin uploading change sets.

    CVS Server Encoding The character encoding used by the operating system on the computer on which the CVS repository is running, for example UTF-8.
    Load interval

    The number of days to include in a single grouping when uploading commits to Agile Manager from the repository.

    Diff template/ File template

    The template for the address to use to access the diff link pages between revisions of a given code document or viewing the content of a given file.. For details on diff links, see Configure the links for an external repository viewer.

    Note: If you are using Agile Manager's internal repository viewer, leave these properties blank.

    After entering the connection information, click Validate Configuration to check the connection.

    Git Properties Comments
    Connection & Authentication details

    Enter the server's connection details.

    Note:  

    • When entering the repository location, you must enter the entire Git URL.
    • To connect to your Git repository using HTTP/S, complete the Username and Password fields.

    • To connect to your Git repository using SSH authentication, select a Security Key option and complete the Passphrase field.

    View diff link / View file link

    The template for the address to use to access the diff link pages between revisions of a given code document or viewing the content of a given file.. For details on diff links, see Configure the links for an external repository viewer.

    Note: If you are using Agile Manager's internal repository viewer, leave these properties blank.

    GitHub view diff/file link templates

    When this property is selected, the GitHub web interface is used to view file diffs and files instead of Agile Manager's built-in repository viewer.

    Note: If you enable this property, you cannot enter a value for the View diff link and View file link properties.

    After entering the connection information, click Validate Configuration to check the connection.

    Perforce Properties Comments
    Connection & Authentication details

    Enter the server's connection details.

    The location of the Perforce repository must include the host name and port of the Perforce server and the Depot name. You should use the format host:port//depot_name for the location.

    View diff link / View file link

    The template for the address to use to access the diff link pages between revisions of a given code document or viewing the content of a given file.. For details on diff links, see Configure the links for an external repository viewer.

    Note: If you are using Agile Manager's internal repository viewer, leave these properties blank.

    Batch size The number of revisions to include in a single upload group when uploading data from your Perforce repository.
    Initial revision The number of the earliest revision to upload from your Perforce repository.
    Charset name

    The Charset name used for communicating with the server in Unicode mode.

    Note: This property is required when communicating with the server in Unicode mode. The property must be empty when communicating with the server in non-Unicode mode.

    After entering the connection information, click Validate Configuration to check the connection.

    TFS Properties Comments
    Connection & Authentication details

    Enter the server's connection details.

    The location of the repository must include the host name and port of the TFS Server and the name of the Project Collection. You should use the format http://tfsServer:tfsport/tfs/ProjectCollectionName.

    View diff link

    The template for the address to use to access the diff link pages between revisions of a given code document or viewing the content of a given file.. For details on diff links, see Configure the links for an external repository viewer.

    Note: If you are using Agile Manager's internal repository viewer, leave these properties blank.

    Batch size The number of revisions to include when uploading data from your Perforce repository.
    Line count service URL

    The URL for count line service for your TFS server.

    Note: You must install ALI TFS Services to use this the Line Count service. This service is part of HPE ALI TFS Services which you have to download and install on the TFS server. The installer may be downloaded from the ALI Summary page. For details, see Set up TFS for ALI.

    You only need to provide the property value if the line count service URL for your TFS server is different than the default value (http://tfsServer:tfsport/tfsali/Service/LineCountService.svc). If the URL is different from this default, and you do not provide the URL, then loaded code changes for all uploads report 0 changed lines and the branch is created with warnings.

    Initial revision The number of the earliest revision to upload from your TFS repository

    After entering the connection information, click Validate Configuration to check the connection.

  4. Share the repository.

    If you are a site administrator, and want to enable this repository to be used in other workspaces, click Shared. The button turns blue when the repository is shared. Click it again to disable sharing for this repository .

    Caution: Only disable sharing after verifying that the repository is not used in ALI configurations in any workspace in the site.

    For details about shared artifacts, see Sharing ALI artifacts across workspaces.

  5. Edit the Change Detection settings.

    As part of its integration with the development process, Agile Manager detects new builds in the source code repository. In order to enable the retrieving of repository information from the repository, you must set the Change Detection settings.

    Set the following Change Detection settings under Change Detection, on the SCM Repository details page:

    Property Description
    Read changes from the SCM Repository and receive builds transmitted by SCM Repository Agents Enables Agile Manager to automatically check the repository for new build information.
    Change interval

    The length of time Agile Manager waits to check the repository for new commit information.

    By default, this interval is 60 minutes.

    Synchronize now Click this button to check the repository for new commits.

    Note: If you use the wizard, select to synchronize immediately upon completing the wizard, or leave the repository to synchronize at the next defined change interval.

  6. Configure commit recognition patterns.

    Detecting and maintaining traceability between change sets and work items is based on a commit message that the developer provides when committing a change to the SCM repository. Agile Manager enables you to customize settings that help Agile Manager link the changes included in the change set to work items.

    You configure the commit pattern settings when adding a new SCM repository or editing existing an existing one.

    For details on the default commit pattern, see Default commit patterns.

    Do one of the following:

    Associate code changes with alternative identifiers

    By default, commits are associated with user stories or defects based on their Agile Manager IDs. If you maintain another set of identifiers for your user stories or defects, developers can commit changes with reference to these alternative identifiers. For example, if you synchronize your workspace with an external defect tracking tool, such as ALM, in their commit messages, developers can reference the identifiers generated by that tool.

    The alternative identifiers are stored in Agile Manager in a custom field. The commit message needs to include a phrase indicating that Agile Manager should look up the identifiers in the custom field. For example: Resolve Jira issue.

    1. In the Repository Details page, expand the Commit Pattern area. Make sure the Basic view is selected.

    2. In the Defects or User Stories section, add a keyword or phrase that indicates that the commit is using an alternative identifier.

    3. In the Field list, select the custom field that stores the alternative identifiers. Agile Manager will look up this field if it identifies the keyword you typed in the commit message.

      Note: Only site custom fields are supported.

    Configure the commit pattern

    1. In the Repository Details page, expand the Commit Pattern area. Make sure the Basic view is selected.
    2. Set the following parameters:

      Parameter Description
      Keywords

      Edit the list of keywords that Agile Manager uses to link a commit to a defect, user story, or task. If any of the words in the list are included in the commit message, the code changes are automatically associated with a defect, user story, or task.

      You can specify the field in which Agile Manager looks up identifiers. See Associate code changes with alternative identifiers above.

      ID prefix

      The character or text that precedes work item numbers in the commit message.

      Examples:#, $, NUM

      Include default Tasktop commit pattern

      Generates default commit messages in the developer's repository commit tool when the repository commit tool has the Tasktop plugin installed.

      This option is enabled by default.

      Case sensitive commit message

      Instructs Agile Manager to read the commit message as case-sensitive.

      This option is disabled by default.

      Multiple Defects, User Stories, or Tasks are separated by Specify the character that separates multiple defect, user story, or task numbers in the commit message.
      Keywords are located [At the beginning / Anywhere in the message]

      Specify where Agile Manager searches for the specified keywords in the commit messages.

      User commit message is separated by Specify the character that indicates that the developer's comments follow.

    Use an editor to configure the commit pattern

    1. In the Repository Details page, expand the Commit Pattern area.
    2. Select the Advanced view.

      The text editor includes code converted from the settings in the Basic view.

    3. Edit the commit pattern code. Use the following examples as guides.

      Example 1

      Example 2

      Example 3

      Example 1

      Pattern:

      ([fixing] REGEX('defects?') IDLIST(DEFECT) | [implementing] REGEX('user stories?') IDLIST(REQ) ) : TEXT

      Sample commit message:

      "fixing defect #56721: something really serious was fixed"
      "defects #57893,#61432: division by zero"
      "user story #1: domains"

      Example 2

      Pattern:

      (UNTIL(RE '((BUG)|(REQ))#') (IDLIST(DEFECT lead='((BUG)?#)?' sep=',' ) | IDLIST(REQ lead='((REQ)?#)?' sep=',' ) ) ){0,} [TEXT]

      Sample commit message:

      "This commit fixes BUG#1,#2 and implements REQ#4,REQ#5 making the product faster (resolving BUG#7)."

      This pattern matches all inputs and extracts of any found 'BUG#' and 'REQ#' patterns. Such an open pattern may not be suitable for enforcing common policy, but it can be useful when data from legacy repositories are loaded in the "read-only" mode, for example, for reporting purposes.

      Example 3

      Tasktop Pattern:

      (REGEX('.*? - task DEF') IDLIST(DEFECT lead='' sep='') | REGEX('.*? - task REQ') IDLIST(REQ lead='' sep='') | REGEX('.*? - task TASK') IDLIST(TASK lead='' sep='')) : TEXT

      Matches default Tasktop messages:

      "OPEN - task DEF10: http://host:9090/qcbin;DEFAULT;ALI_DEV-DEF10"
      "Incomplete - task REQ42: http://host:9090/qcbin;DEFAULT;ALI_DEV-REQ42"
    4. Use the following options to configure the advanced commit patterns:

      Option Description
      Test Against Existing Commits Enables you to test the advanced commit pattern text against settings already entered for existing repository commits.
      Case Sensitive commit messages Enforces case sensitivity on the advanced commit text.
      Restore Defaults Reverts your changes and replaces the default keywords as they were displayed before your changes.
      Test Enables you to test a custom message for correct syntax before entering it into the commit pattern. Enter your text into the edit field at the bottom of the tab and click Test.