Connect a code repository
Edit on GitHubThis document describes how to connect a code repository to Spryker Cloud Commerce OS.
If you specified a code repository in the Onboarding Questionnaire, we connected it to your Staging environment during the initial setup. To connect a code repository to another environment, follow this document.
Spryker supports only the cloud variants of the repositories listed below. To connect an on-premises repository, check the documentation of your Git repository provider about mirroring it to one of the following providers.
Spryker supports the following version control systems:
Spryker also supports all the Git repositories that support AWS CodeCommit push mirroring. Similar to the GitLab setup, you can configure all the commits from your version control system to be mirrored to Spryker and consumed by our pipelines to build and deploy your system.
We recommend mapping your branches to environments as follows:
Environment | Branch |
---|---|
Production | master |
Staging | dev |
Test | test |
Connect a GitHub code repository
- Log into the AWS management console of the environment you want to connect a repository to.
- Go to CodePipeline.
- One the Pipelines page, select the pipeline you want to connect the repository to.
- On the page of the pipeline, click Edit. This opens the pipeline editing page.
- In the Edit: Source pane, click Edit stage.
- In the Spryker_App_Src section, click the Edit action button. This opens the Edit action window.
- For Action provider, select GitHub(via GitHub App). This adds GitHub related fields to the window.
- Click Connect to GitHub and authorize AWS CodePipeline to access your GitHub repository.
- For Repository name, enter and select the repository you want to connect.
- For Branch name, enter and select the branch you want to connect.
- Click Done.
- In the Edit: Source pane, click Done.
- Scroll up and click Save.
- In the Save pipeline changes window, click Save.
Your GitHub repository is now successfully connected!
Connect a Bitbucket code repository
Currently, only GitHub is integrated into AWS CodeBuild. To use a Bitbucket code repository, configure AWS CodeStar by following the steps below.
Prerequisites
Ensure that your BitBucket account has Admin permissions in the code repository.
AWS CodeStar integrates via OAuth 2.0 and requires the following permissions:
-
Read your account information.
-
Read your repositories and their pull requests.
-
Administer your repositories.
-
Read and modify your repositories.
Retrieve a connection ARN
To get an Amazon Resource Name (ARN) of a connection, create a CodeBuild Connection:
- In the AWS Management Platform, go to Services > CodeBuild > Settings > Connections.
- Select Create connection.
- In the Create a connection pane, select BitBucket.
- Enter Connection name.
-
Select Connect to Bitbucket.
-
Select Grant access.
- Select Install a new app.
- Select Grant access.
- In the Connect to Bitbucket pane, select Connect.
The page refreshes with all the fields cleared.
- Select Connections.
In the Connections pane, you can see the created connection and its ARN.
- Provide the connection ARN via support.
We connect the repository shortly after you provide the details.
Connect a GitLab code repository
Currently, CodePipeline doesn’t have a native integration of GitLab. To make it work, you can configure a CodeCommit repository as a mirror of a GitLab repository.
To avoid synchronization issues, do not push any changes to the CodeCommit repository.
Prerequisites
Prepare for configuration:
- Ensure that your GitLab account has Admin permissions in the code repository.
- Request the following details via support:
- CodeCommit repository URL
- Username and password for HTTPS authorization in CodeCommit repository
GitLab mirroring
To configure GitLab mirroring:
- In the GitLab account, go to the code repository.
- Select Settings > Repository.
- Select Expand next to Mirroring repositories.
- In Git repository URL, enter the CodeCommit repository URL provided by support.
- For Mirror direction, select Push.
- For Authentication method, select Password.
- Enter a Password.
- Select Mirror repository.
Allow the synchronization several minutes to complete and you should see the record of your mirrored repository.
Next step
Thank you!
For submitting the form