Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mirror from github to gitlab

In Gitlab it is now possible to automatically mirror remote GIT repo: http://docs.gitlab.com/ee/workflow/repository_mirroring.html

Synchronization is either done manually or via gitlab cron script (running every hour).

I would like to sync in this way my github repo and run Gitlab CI jobs using my own runners.

Is is possible to automatize sync task, i.e. via Github webhooks ? Do you know if there is any other way to do it with Gitlab infrastructure ?

I would like to avoid hacking like: - cloning github repo in gitlab runner - running my own cron jobs which do sync more often

like image 958
Leszek Grzanka Avatar asked May 31 '16 13:05

Leszek Grzanka


1 Answers

Mirror does work, but it's slow. If your goal is to run gitlab-ci for a github repository, good news, gitlab has released a new version which lets you use github.com repository with gitlab-ci:
https://about.gitlab.com/2018/03/22/gitlab-10-6-released/

GitLab CI/CD for GitHub feature a part of our GitLab.com Free tier

Instructions:

  • https://about.gitlab.com/2018/03/22/gitlab-10-6-released/#gitlab-cicd-for-external-repos
  • https://docs.gitlab.com/ee/ci/ci_cd_for_external_repos/
like image 122
GabLeRoux Avatar answered Sep 19 '22 17:09

GabLeRoux