Add external repositories in Cloud Manager - Early Adopter
- Topics:
- Cloud Manager
CREATED FOR:
- Admin
Learn how to add an external repository into Cloud Manager. Cloud Manager supports integration with GitHub Enterprise, GitLab, and Bitbucket repositories.
Configure an external repository
Configuration of an external repository in Cloud Manager consists of three steps:
- Add an external repository to a selected program.
- Provide an access token to the external repository.
- Validate ownership of the private GitHub repository.
- Configure a webhook to an external repository.
Add an external repository
-
Log into Cloud Manager at my.cloudmanager.adobe.com and select the appropriate organization.
-
On the My Programs console, select the program to which you want to link an external repository.
-
In the side menu, under Program, click
-
Near the upper-right corner of the Repositories page, click Add Repository.
-
In the Add Repository dialog box, select Private Repository to link an external Git repository to your program.
-
In each respective field, provide the following details about your repository:
FieldDescriptionRepository NameRequired. An expressive name for your new repository.Repository URLRequired. The URL of the repository.
If you are using a GitHub-hosted repository, the path must end in.git
.
For example,https://github.com/org-name/repo-name.git
(URL path is for illustration purposes only).
If you are using an external repository, it must use the following URL path format:https://git-vendor-name.com/org-name/repo-name.git
orhttps://self-hosted-domain/org-name/repo-name.git
And match your Git vendor.Select Repository TypeRequired. Select the repository type that you are using:
- GitHub (GitHub Enterprise and the self-hosted version of GitHub)
- GitLab (both
gitlab.com
and the self-hosted version of GitLab) - Bitbucket (only
bitbucket.org
(cloud version) is supported. The self-hosted version of Bitbucket was deprecated starting February 15, 2024.)
If the repository URL path above includes the Git vendor name, such as GitLab or Bitbucket, the repository type is already pre-selected for you.
DescriptionOptional. A detailed description of the repository. -
Select Save to add the repository.
-
In the Private Repository Ownership Validation dialog box, provide an access token to validate ownership of the external repository so you can access it.
Selecting an existing access token for a Bitbucket repository.Token typeDescriptionUse existing Access TokenIf you have already provided a repository access token for your organization and have access to multiple repositories, you can select an existing token. Use the Token Name drop-down list to choose the token you want to apply to the repository. Otherwise, add a new access token.Add new Access TokenRepository type: GitHub Enterprise
-
In the Token Name text field, type a name for the access token you are creating.
-
Create a personal access token by following the instructions in the GitHub documentation.
-
Required permissions for the GitHub Enterprise Personal Access Token (PAT)
These permissions ensure that Cloud Manager can validate pull requests, manage commit status checks, and access necessary repo details.
When you generate the PAT in GitHub Enterprise, make sure it includes the following repository permissions:- Pull request (read and write)
- Commit statuses (read and write)
- Repository metadata (read-only)
- In the Access Token field, paste the token you just created.
Repository type: GitLab
-
In the Token Name text field, type a name for the access token you are creating.
-
Create a personal access token by following the instruction in the GitLab documentation.
-
Required permissions for the GitLab Personal Access Token (PAT)
These scopes allow Cloud Manager to access repository data and user information as needed for validation and webhook integration.
When you generate the PAT in GitLab, make sure it includes the following token scopes:- api
- read_user
- In the Access Token field, paste the token you just created.
Repository type: Bitbucket
-
In the Token Name text field, type a name for the access token you are creating.
-
Create a repository access token using the Bitbucket documentation.
-
Required permissions for the Bitbucket Personal Access Token (PAT)
These permissions allow Cloud Manager to access repository content, manage pull requests, and configure or react to webhook events.
When you create the app password in Bitbucket, make sure it includes the following required app password permissions:- Repository (read-only)
- Pull requests (read and write)
- Webhooks (read and write)
- In the Access Token field, paste the token you just created.
NOTE
The feature Add new Access Token is currently in the Early Adopters phase. Additional functionalities are being planned. As a result, the required permissions for access tokens may change. Additionally, the user interface for managing tokens may be updated, potentially including features like token expiration dates. And, automated checks to ensure that tokens linked to repositories remain valid. -
-
Click Validate.
After validation, the external repository is ready to use and link to a pipeline.
Link a validated external repository to a pipeline
-
Add or edit a pipeline:
Add Non-Production Pipeline dialog box with selected repository and Git branch, -
When adding or editing a pipeline, to specify the Source Code location for your new or existing pipeline, choose the external repository you want to use from the Repository drop-down list.
-
In the Git Branch drop-down list, select the branch as the source for the pipeline.
-
Click Save.
Configure a webhook for an external repository
Cloud Manager lets you configure webhooks for external Git repositories that you have added. See Add an external repository. These webhooks permit Cloud Manager to receive events that are related to different actions within your Git vendor solution.
For example, webhooks allow Cloud Manager to trigger actions based on events such as the following:
- Pull request (PR) creation – Initiates PR validation functionality.
- Push events – Starts pipelines when the “On Git Commit” trigger is turned on (enabled).
- Future comment-based actions – Allows workflows, such as direct deployment from a PR, to a Rapid Development Environment (RDE).
Webhook configuration is not required for repositories hosted on GitHub.com
because Cloud Manager integrates directly through the GitHub app.
For all other external repositories that are onboarded with an access token, such as GitHub Enterprise, GitLab, and Bitbucket, webhook configuration is available and must be set up manually.
To configure a webhook for an external repository:
-
Log into Cloud Manager at my.cloudmanager.adobe.com and select the appropriate organization.
-
On the My Programs console, select the program to which you want to configure a webhook for an external Git repository.
-
In the upper-left corner of the page, click
-
In the left side menu, Under the Program heading, click
-
On the Repositories page, using the Type column to guide you in your selection, locate the repository you want, then click
-
From the drop-down menu, click Config Webhook.
-
In the Config Webhook dialog box, do the following:
- Next to the Webhook URL field, click
Paste the URL in a plain text file. The copied URL is required for your Git vendor’s Webhook settings. - Next to the Webhook Secret token/key field, click Generate, then click
Paste the secret in a plain text file. The copied secret is required for your Git vendor’s Webhook settings.
- Next to the Webhook URL field, click
-
Click Close.
-
Navigate to your Git vendor solution (GitHub Enterpriser, GitLab, or Bitbucket).
All the details on the webhook configuration and the events that are required for each vendor are available in Add an external repository. Under step 8, see the table.
-
Locate the solution’s Webhook Settings section.
-
Paste the Webhook URL that you copied earlier into the URL text field.
-
Replace the
api_key
query parameter in the Webhook URL with your own real API key.To generate an API key, you must create an integration project in Adobe Developer Console. See Creating an API Integration Project for full details.
-
-
Paste the Webhook Secret that you copied earlier into the Secret (or Secret key, or Secret token) text field.
-
Configure the webhook to send the required events that Cloud Manager expects.
RepositoryRequired webhook eventsGitHub EnterpriseThese events allow Cloud Manager to respond to GitHub activity, such as pull request validation, push-based triggers for pipelines, or Edge Delivery Services code sync.
Make sure that the webhook is set up to trigger on the following required webhook events:- Pull requests
- Pushes
- Issue comments
GitLabThese webhook events allow Cloud Manager to trigger pipelines when code is pushed or a merge request is submitted. They also track comments related to pull request validation (through note events).
Make sure that the webhook is set up to trigger on the following required webhook events- Push events
- Merge request events
- Note events
BitbucketThese events ensure that Cloud Manager can validate pull requests, respond to code pushes, and interact with comments for pipeline coordination.
Make sure that the webhook is set up to trigger on the following required webhook events- Pull request: Created
- Pull request: Updated
- Pull requests: Merged
- Pull request: Comment
- Repository: Push
Validation of pull requests with webhooks
After webhooks are correctly configured, Cloud Manager automatically triggers pipeline executions or PR validation checks for your repository.
The following behaviors apply:
-
GitHub Enterprise
When the check is created, it appears like the following screenshot below. The key difference from
GitHub.com
is thatGitHub.com
uses a check-run, while GitHub Enterprise (using personal access tokens) generates a commit status: -
Bitbucket
When code quality validation is running:
Uses commit status for tracking PR validation progress. In the following case, the screenshot shows what happens when a code quality validation fails due to a customer issue. A comment is added with detailed error information, and a commit check is created, which shows the failure (visible on the right):
-
GitLab
GitLab interactions rely solely on comments. When validation begins, a comment is added. When validation is complete (whether successful or failed), the initial comment is removed and replaced with a new comment containing validation results or error details.
When code quality validation is running:
When cold quality validation is finished:
When code quality validation fails with an error:
When the code quality validation fails due to customer issues:
Troubleshoot webhook issues
- Ensure that the Webhook URL includes a valid API key.
- Check that webhook events are correctly configured in your Git vendor settings.
- If PR validation or pipeline triggers are not working, verify that the Webhook Secret is up to date in both Cloud Manager and your Git vendor.