Updating GitHub or GitLab Repository Clones

You can schedule when to update your GitHub of GitLab repository clones to reduce the amount of waiting time for users when performing transactions. The scheduled update only takes place for branches and tags that have already been fetched. You can also disable this automatic update.

This task shows you how to:


Before you begin: Define your connector. For more information, see GitHub and GitLab Connector Configuration: Add/Edit Repository.

Updating the Time for the Automatic Updates

You can schedule the optimal time for the automatic update. You can select a time when system usage is typically low. The default is 1:00 AM local time.

  1. Edit the gitlab_connector XML file in the TomEE directory.

    WEB-INF\3DSCM\gitlab_connector.xml

  2. In the configuration section for the GitHub or GitLab connector being updated, add this tag after the cloneUpdateDisabled tag:

    <cleanupRuntime>HH:MM</cleanupRuntime>

    Where HH:MM is the time in 24-hour format, for example, the default time is 01:00. To set the time to 11:30PM, enter 23:30.

  3. Save the file and restart the TomEE server.

Result: The changes take effect after the server has been restarted.

Disabling Automatic Updates

You can disable automatic clone updates. This can result in a slight delay for users as the repository synchronizes on demand.

  1. Edit the gitlab_connector XML file in the TomEE directory.

    WEB-INF\3DSCM\gitlab_connector.xml

  2. In the configuration section for the GitHub or GitLab connector being updated, set this tag, cloneUpdateDisabled to true:

    <cloneUpdateDisabled>true</cloneUpdateDisabled>

  3. Save the file and restart the TomEE server.

Result: The changes take effect after the server has been restarted.