Create (CI/CD) projects for external repositories
When creating a new project, we have different options and all of them include having a local repository on GitLab. If we want to use GitLab primarily for CI/CD, and keeping the code somewhere else (e.g., GitHub or Bitbucket), we need an additional way that automatically sets up everything that is needed.
It is important to support GitHub, GitHub Enterprise, and Bitbucket Cloud, but this should be delivered in small increments so that work can be parallelized. For this reason, we should implement as a URL import and then add each integration.
Add a new panel in the New project page, specifically to create CI/CD projects
- It should have the ability to create a CI/CD project from Repo by URL (manual process)
- It should have capabilities similar to the New project > Import project > GitHub, with ability to use OAuth2 authentication to automatically fetch projects from the linked GitHub account.
Import the project and configure:
- Disable issues, merge requests, container registry, wiki, snippets
- Enable pull mirroring of the project
- Match the visibility of imported repo if importing from GitHub or Bitbucket (e.g. if GitHub repo is private, make project private. If GitHub repo is public, make project public)
- The above configuration can be edited after creation, but we'll start with smart defaults.
Follow up improvements (within %10.6)
- Automatically setup a service integration with GitHub
- Automatically setup web hooks in GitHub to call the GitLab pull mirror API
- It should have capabilities similar to the New project > Import project > Bitbucket, with ability to use OAuth2 authentication to automatically fetch projects from the linked Bitbucket Cloud account.
A project is where you house your files (repository), plan your work (issues), and publish your documentation (wiki), among other things.
All features are enabled for blank projects, from templates, or when importing, but you can disable them afterward in the project settings.
To use CI/CD features for an external repository, choose CI/CD project.
Run CI/CD pipelines for external repositories
Connect your external repositories and CI/CD pipelines will run for new commits. A GitLab project will be created with CI/CD features enabled.
If using GitHub, you’ll be able to see the pipeline statuses for each commit on GitHub. More info
- This sentence is only applicable if the “GitHub” option is present and #3836 (closed) is done. The “More info” link should direct users to the documentation about that GitHub project integration (from that linked issue).