Working with Git repositories

You can add another repository in addition to the existing repositories in your project or edit the repository settings, by updating the credentials, or by removing references to the repository. You can also refresh or delete the repository, and configure webhooks for the repository.

Adding another repository

When you created a project, you probably added a repository. If you did not add a repository when you created a project, you can add one or more repositories any time after you create a project.

Updating the authentication credentials of the repository

If the authentication credentials of the Git repository which was added to your project are changed, then you must update the new credentials of the repository in HCL OneTest Server.

Before you begin

You must be a project owner or a tester with access to edit repositories.

About this task

In HCL OneTest Server, the repository is refreshed at regular intervals to pull the latest changes committed to the Git repository. After you update your authentication credentials of the repository, the repository is refreshed to ensure that you have continued access to the Git repository and to the latest assets in the repository.

Procedure

  1. Open the project.
  2. Go to the Repositories page.
  3. Click the Menu icon menu icon and click the Change icon.

    The Edit repository page is displayed.

  4. Enter the new credentials and click Update.

    The new credentials are updated and your access to the repository is retained.

Refreshing repositories manually

You can manually trigger the refresh activity for a server repository to instantly fetch and synchronize the changes from the remote repository.

Before you begin

You must have completed the following tasks:
  • Configured the repository that contains the test assets in your project.
  • Been assigned a project owner or a tester role.

Procedure

  1. Open the project.
  2. Go to the Repositories page.
  3. Click the Menu icon menu_icon and select Refresh.
    The refresh activity is triggered.
    Note: The Refresh option is disabled when the refresh is in progress. After the refresh is completed, the Refresh option is enabled.
    The following table lists the icons and their description based on the status of the refresh activity:
    Refresh icon Description
    Tick icon The last refresh activity was successful.
    Failed assets icon

    The last refresh activity was successful but errors were found while processing some of the test assets. To view the error details of the test assets for a specific repository, you can click the arrow inline with the repository name.

    You can resolve the errors of these test assets in the Git server, and then refresh the server repository, if required.

    Note: The repository, which contains the branch that is selected in the Global branch field, displays the unprocessed test assets for that branch. Other repositories display the unprocessed test assets for their master branch.
    Error icon The refresh activity was not successful due to any one of the following reasons:
    • Internal error
    • Connection issue
    • Authentication failure
    • Disk quota exceeded
    • Repository unreachable

Results

You have manually refreshed the repository and the Last Refreshed field is updated with the following details:
  • The time when it was last refreshed.
  • Latest commit ID and message of the remote repository.

Creating webhooks

You can configure a webhook for a repository in the Git server to notify HCL OneTest Server whenever there is a push event in the remote repository. Then, the refresh activity is triggered to fetch the latest changes to the server repository.

Before you begin

You must have completed the following tasks:
  • Configured the repository that contains the test assets in your project.
  • Been assigned a project owner or a tester role.

Procedure

  1. Open the project.
  2. Go to the Repositories page.
  3. Click the Menu icon menu_icon and then click Webhook.

    The Webhook Configuration dialog box is displayed.

  4. Copy the URL and the Secret of the repository that you want to configure.
    Note: The URL and the Secret details are specific to a repository.
  5. Click the link of the repository for which you want to configure the webhook.

    The remote repository page is displayed.

  6. Paste the details, which you copied from HCL OneTest Server, in the appropriate fields of the remote repository.

Results

You have configured the webhook for a repository in the Git server. The changes of the remote repository are synchronized in the server repository.

Deleting a repository

You can delete repositories that you no longer require in your test environment.

Before you begin

You must have completed the following tasks:
  • Configured the repository that contains the test assets in your project.
  • Been assigned a project owner or a tester role with access to delete repositories.

About this task

You can delete a repository that you have configured for your project.

Procedure

  1. Open your project and go to the Repositories page.

    You can see a list of repositories that you added to the project.

  2. Delete a repository that you want to remove from the project.

    The repository is deleted and removed from the list.

What to do next

After you have edited the Git credentials, you can continue accessing the Git repository and the test assets. If you have deleted the Git repository, you cannot access the test assets available under that repository.