Hacker News new | ask | show | jobs
by williamchia 3007 days ago
Hi Eslaught - So the new CI/CD for GitHub feature should be solving the pain points of the old manual mirroring process. When you set up a project and Oauth to GitHub it should automatically implement 3 components: - Bidirectional Mirroring https://gitlab.com/gitlab-org/gitlab-ee/issues/3745 - push webhook to GitLab to trigger CI/CD immediately once a code is committed (e.g. "push mirroring") https://gitlab.com/gitlab-org/gitlab-ee/issues/4691 - GitHub project service integration (to webhook CI status back to GitHub.) https://gitlab.com/gitlab-org/gitlab-ee/issues/3836

Is this not working for you? (may be a bug)

Did you set up the toy instance by creating a CI/CD project and use the GitHub Oauth?

2 comments

FWIW, if you created the connection between GitLab and GitHub for your project before 10.6, you'll have to remove the connection and then re-add it to get the push-based mirroring to happen. Otherwise, yes, it will still poll.
How do you do this?
It seems like you should be able to do this, but there may need to be an update to work with already-mirrored repos since the feature was designed to have a flow that expects a new project to be created.

I've logged an issue to track down the process: https://gitlab.com/gitlab-org/gitlab-ce/issues/44552

I guess I got lost on my initial pass through the UI.

I deleted my toy repo and did it over again; it seems to be working now. Latency seems to be in the 20-30 second range for incremental pushes, which is pretty good.

Is there a way to do this for existing repos? Or do we have to delete and re-create our production repo to do this?

> Is there a way to do this for existing repos?

You can add a webhook on GitHub and have it point to our Pull Mirroring API [1], followed by manually setting up the integration to send status updates back [2].

We're looking to make this process easier, and have explored ways we might implement this in https://gitlab.com/gitlab-org/gitlab-ee/issues/5220.

[1] https://docs.gitlab.com/ee/api/projects.html#start-the-pull-...

[2] https://docs.gitlab.com/ee/user/project/integrations/github....