You are not logged in. Click here to log in.

Codebeamer Application Lifecycle Management (ALM)

Search In Project

Search inClear

Tags:  SCM

Using external SCM services in codebeamer



This feature is available since codebeamer 22.04 (FELICITY).
This is an experimental feature, and is still being developed. Therefore, any bugs reported regarding its malfunction will be fixed in the coming versions of codebeamer.

How to enable external SCM project?

To enable the external SCM project in codebeamer, the following line is to be added to the Application configuration:

"externalProviderScm" : { "enabled" : true }

Application Configuration options

The default values of the new SCM feature options:

"externalProviderScm" : {
	"enabled" : true,
	"repositorySynchronizationPeriodInSeconds" : 3600,
	"synchronizationCyclePeriodInSeconds" : 60,
	"fetchPageSize" : 100,
	"jobDoneCommentEnabled" : true
}

Explanation for the Options:

  • "enabled" - Shows/hides the SCM project, and enables/disables the synchronization.
  • "repositorySynchronizationPeriodInSeconds" - It determines whether the repository is considered fresh or ready to be updated.
  • "synchronizationCyclePeriodInSeconds" - Marks the background synchronization process run period.
  • "fetchPageSize" - The API fetch request/response size. The maximum value is 100.
  • "jobDoneCommentEnabled" - To Enable/disable the background synchronization to create comments after run.


The new SCM feature creates a new system project which is hidden by default. By enabling the feature, the new system project will be visible among the projects. This project has specialized trackers, within which only the access tokens and the repositories items are editable.


The names of the trackers or the projects are not to be changed as those are hard-coded.


Access tokens

To add a new Access token, see creating-a-personal-access-token

  • Only the repo segment needs to be selected.
  • Copy and paste the token into the Summary field of the new Access token tracker item, and click on [Save].

Repositories

To add a new repository, create or open an existing GitHub repository.

Only repositories with single default branches are supported, meaning that the repositories must have root elements for all branches.


The following fields need to be filled in:


Mandatory values:

  • Status - Enable/disable background synchronization, or show error state.
  • SCM Type - The provider of the SCM repository. Only GitHub is supported at present.
  • Access token - The created Access token needs to be selected.
  • Remote API url - Public or on-premise API url. For GitHub's, see https://api.github.com/
  • Owner name - The user or organization name of the repository.
  • Repository name - The name of the Repository.
  • Enable patch synchronization - Enable/disable commit file change synchronization (The result is not shown on the User Interface).
  • Summary - The given name of the repository (can be anything).

Values to be filled in after synchronization:

  • Base repository - Link to the Base repository if exists in the application. The repository is a fork.
  • Remote id - The SCM internal remote id of the repository.
  • Last synchronization date - The date of the last background synchronization.
  • Html URL - Link to the external provider's repository page.
  • Default branch - Single mandatory branch for an external repository, that can be viewed in the branch section.
  • First commit hash - First - usually init - commit revision id of the repository.
  • Fork - It shows whether a repository is considered to be a fork on the external provider.

Background processes and UI actions

  • The background synchronization periodically updates the repository, if enabled. (Fetching missing branches, commits, removing deleted ones, remove dangling commits, and update commits patches.)
  • These background processes can be triggered by opening the options on the Repository Details View, and by bulk on the Repository Tracker Table View.
  • The update processes only fetch changes that are new to the repository, while the full synchronizations remove all items and re-synchronize the whole repository.
  • The dangling commit cleanup removes the remaining commits after branch deletes.
  • The cleanup job removes all the related items from the repository (commits, branches, tags), and disables the repository preventing further synchronization.


Webhook

Webhook can be configured to send the changes made in the external repository to codebeamer application:


  • The Webhook path is: /scm/webhook/{provider}.json
  • The GitHub path is: /scm/webhook/github.json
The Content type needs to be set to application/json.


Setting New SCM user keys in the User Account

To record New SCM user keys, go to My Start ► My Account ► [Edit Account], and provide the related details once the external repository is created. The changes can be finalized by clicking on the [Save] button.