19

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

Leszek Grzanka
  • 191
  • 1
  • 3

1 Answers1

7

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:

GabLeRoux
  • 16,715
  • 16
  • 63
  • 81
  • 3
    This is only free until next month, after which it will be paid only. I'm experimenting with using https://github.com/samrocketman/gitlab-mirrors to mirror projects... personally I think this is an area that GitLab is missing an opportunity. Best way to get people to use your full product is to lure them in with some great feature that's the best and can work with their existing tool(s). Wheee! – Jarvis Feb 28 '19 at 17:50
  • They extended it until September 2019 – Tamir Gefen Mar 31 '19 at 13:11
  • Also seems to bit be available at all to self-hosted users. Mirroring will probably be ideal. – BeepDog Jun 03 '19 at 20:18