Connect Spryker Code Upgrader to a GitLab managed project

Edit on GitHub

There are two options for connecting Spryker Code Upgrader to your repository: using the native integration or using an access token.

Connect Spryker Code Upgrader using the native integration

  1. In the Upgrader UI, go to Projects.
  2. On the Projects page, select the Spryker Upgrade Service project.

Spryker CI Projects

  1. Go to Code.

Spryker CI Code

  1. In the Connect Git repository pane, for GIT HOSTING PROVIDER, select GitLab.

  2. For ADD GITLAB INTEGRATION select +. This opens GitLab in a new window.

Spryker CI Code GitLab

  1. To authorize Buddy CI to access your account, click Authorize. Your account should have administrator rights in the repository you want to connect.

Spryker CI GitLab

  1. For GROUP, select the GitLab group that has access to the repository you want to connect.

  2. For REPOSITORY, select the repository you want to connect. This displays a success message. The Upgrader is now connected to your repository.

Spryker CI GitLab Repository Selection

Connect Spryker Code Upgrader using the GitLab access token

To connect the Upgrader manually using the GitLab access token, take the following steps.

Prerequisites

Create a GitLab access token

GitLab access token should have the following repository permissions:

  • api for Spryker CI: grants complete read and write access to the scoped project API, including the Package Registry.

  • write_repository for Spryker Upgrader Service: grants read and write access to the repository to enable the Upgrader to analyze the project and create PRs.

Configure the integration with GitLab

  1. In the Upgrader UI, go to Projects.
  2. On the Projects page, select the Spryker Upgrade Service project.

Spryker CI Projects

  1. Go to Integrations.
  2. On the Integrations page, click New integration.

Spryker CI Integration

  1. On the New integration page, click the Git tab.
  2. Select GitLab.

Spryker CI Integration GitLab

  1. On the Add new GitLab integration page, enter a NAME.
  2. Select SHARING and AVAILABILITY per your requirements.
  3. For AUTHORIZATION METHOD, select Access Token.
  4. For ACCESS TOKEN, enter the GitLab access token.

Spryker CI Integration GitLab Form

  1. Click New integration. This connects the Upgrader to your GitLab organization.

  2. To select the needed repository, go to Code.

  3. On the Switch repository or Git hosting provider page, click the GitLab tab.

  4. Select a REPOSITORY to connect the Upgrader to. This displays the message about a successful update. Now the Upgrader is connected to the repository.

Spryker CI GitLab Repository Selection

Next steps

Set the target branch for the Upgrader