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
Regular GitHub
- 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.
- For Connection choose an existing connection or click Connect to GitHub to create a new one 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 connected.
GitHub Enterprise Server
- Log into the AWS management console of the environment you want to connect a repository to.
- Go to CodePipeline.
- On 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 Enterprise Server.
- For Connection choose an existing connection or click Connect to GitHub Enterprise Server and follow the authorization proccess to create a connection. Next steps assume you’ve selected a connection.
- 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 Enterprise Server repository is now connected.
Optional: Disable automatic pipeline triggers
By default, pipelines are automatically triggered on every push event using predefined triggers and filters.
To manage the rollout manually or prevent a specific pipeline from starting, do the following:
- On the page of the pipeline, click Edit.
- In the Edit: Git triggers pane, click Edit stage.
- Clear the Webhook checkbox.
- Click Save.
- In the Save pipeline changes window, click Save.
Connect a Bitbucket code repository
Prerequisites
Ensure that your Bitbucket account has Admin permissions in the code repository. Some AWS regions are not supported, see Bitbucket Cloud connections.
Connect your Bitbucket repository
- Log into the AWS management console of the environment you want to connect a repository to.
- Go to CodePipeline.
- On 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 Bitbucket.
- For Connection choose an existing connection or click Connect to Bitbucket and follow the authorization process to grant AWS CodePipeline access to your Bitbucket repository. Next steps assume you’ve granted access and selected a connection.
- 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 Bitbucket repository is now connected.
Connect a GitLab code repository
Prerequisites
Ensure that your GitLab account has Admin permissions in the code repository. Some AWS regions are not supported, see GitLab.com connections.
Connect your GitLab repository
- Log into the AWS management console of the environment you want to connect a repository to.
- Go to CodePipeline.
- On 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 GitLab.
- For Connection choose an existing connection or click Connect to GitLab to create a new one.
- Follow the authorization process to grant AWS CodePipeline access to your GitLab 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.
- Save the changes to complete the wizard.
Your GitLab repository is now successfully connected!
Legacy: Connect a GitLab code repository through mirroring
This section describes how to connect a GitLab repository using a CodeCommit mirror.
The mirroring setup is deprecated in favor of the direct GitLab integration. Use this method only if direct integration is not available for your GitLab instance.
To avoid synchronization issues, do not push any changes to the CodeCommit repository.
Prerequisites
- Make sure 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
A dedicated user will be created for this task. The user will only have the permissions to connect the repository.
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