Design for integrating GitLab CI with GitHub SCM (No mirroring)
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Related to https://gitlab.com/gitlab-com/gitlab-OKRs/-/work_items/9875+
Release notes
Problem to solve
Users need a better way of integrating an external SCM tool (GitHub) with GitLab CI than the current mirroring solution.
Why?
Currently, GitLab uses a mirroring process to integrate with GitHub repositories, which has led to performance issues and delays in CI pipeline execution. Additionally, we are seeing a trend that users need enhanced security in this area and do not want to allow GitLab access to their code.
Intended users
GitHub users who are using it for SCM, but want to integrate with GitLab to use GitLab CI. These personas include:
- Software developers
- Platform engineers
- System administrators
User experience goal
Users should be able to run the CI definition (hosted on GitHub) for a repository hosted on GitHub without compromising security.
Proposal
Design specs:
- Be sure to go through all 3 user flows in design management and read the on-screen notes.
- Figma file:
Some architectural design details that impact the UX:
This solution will use the GitHub App to connect GitHub and GitLab.
We are currently leaning towards Idea C. This offers a new way for users to integrate GitHub SCM and GitLab CI. We need to define the user experience for this approach. Pure CI from External Source (Idea C):
- Implement CI that reads directly from the external GitHub repository.
- The gitlab-ci.yml is hosted on Github.com
- The runners will be fetching from Github directly
Further details
Permissions and Security
Documentation
Availability & Testing
Available Tier
Feature Usage Metrics
What does success look like, and how can we measure that?
What is the type of buyer?
Is this a cross-stage feature?
What is the competitive advantage or differentiation for this feature?
Links / references
Additional information
Iteration breakdown
First iteration
Should allow users to:
-
Workflow 1: Connect their GitHub repository with a GitLab repository
- Install a GitLab app on their GitHub repository/organisation
- Verify this connection manually
-
Workflow 2: 1 to 1 user mapping on both platforms to get permission to run a pipeline on GitLab from GitHub
- Manually go and create a user on GitLab and link it with GitHub
-
Workflow 3: Trigger a pipeline on GitHub and run it successfully on Gitlab
- Get a generic error if the user who triggers the pipeline on GitHub does not exist on the GitLab project connected
- Workflow 4: Display the status of the pipeline running on GitLab(on GitLab)
Later iteration:
- Automate verification of connection
- Automate importing user accounts to GitLab
- Provide more specific and actionable errors when a connection is broken or user identity fails to map
- Cross-link the resources on GH and GL. For example, users should be able to navigate to the commits and branches on Gh from GL