Skip to main content

Git CI Integration

Git CI keeps a Smart Engineering repository synchronized with a Bitbucket Cloud repository. When a configured Git event matches the selected triggers and filters, AI Cockpit imports and indexes the exact commit that caused the event.

Use Git CI when the source repository changes regularly and the team wants the code available in Smart Engineering without uploading a new .zip package each time.

Before you start

  • Open the Smart Engineering repository that should receive the updates.
  • Have the Bitbucket Cloud workspace and repository slug, for example workspace/repository.
  • Have the repository clone URL and a read-only Bitbucket access token or API token.
  • Make sure you can create a webhook in the Bitbucket repository.

Git CI currently supports Bitbucket Cloud. The integration imports and indexes source code; it does not create documentation tasks or regenerate existing documentation or Code Modernization projects automatically.

Set up the integration

  1. Open the repository configuration page at /repositories/:repositoryId/config.

  2. Select Set up Git CI.

  3. Enter the Bitbucket repository identity (workspace/repository), its clone URL, and a credential with read access.

  4. Select one or more triggers:

    TriggerMatching Bitbucket event
    Push to branchA push to a matching branch.
    Merged pull requestA pull request merged into a matching branch.
    Tag createdA push that creates a matching tag.
  5. Set branch and tag filters when needed. Filters support glob patterns, such as main, release/*, and v*.

  6. Keep the integration enabled and, optionally, enter an email address to receive processing notifications.

  7. Select Configure integration.

  8. Copy the displayed webhook URL and webhook secret. The secret is shown only once.

  9. In Bitbucket, create a webhook with that URL and secret, and enable the events that correspond to the triggers you selected.

Store the webhook secret securely. Do not commit it to source control or share it in tickets or chat messages.

What happens after an event

For each matching event, AI Cockpit queues the revision, imports the exact commit SHA, and runs indexing. The integration status shows the last successfully processed commit. The configured recipient receives a notification when processing succeeds or fails.

Events that do not match the selected trigger, branch filter, or tag filter are ignored. Repeated notifications for the same commit do not create duplicate imports, and updates for the same repository are processed in order.

Manage the integration

Use Manage integration on the configuration page to change triggers, filters, the notification recipient, or whether processing is enabled. To rotate the credential, enter a new token and save the changes.

The repository identity and clone URL are fixed after setup. To use a different Bitbucket repository, remove the integration and create it again. Removing an integration stops pending deliveries from being processed.

If processing fails three times in a row, AI Cockpit disables the integration and cancels pending deliveries. Correct the cause, such as an expired credential or inaccessible revision, then enable the integration again.

Use Git CI with Code Modernization

Wait for the imported revision to finish processing before starting a new Code Modernization project. When creating the project, choose the version that contains the revision you want to use as its reference. A Git CI update does not change the reference version of an existing modernization project.

See also