Giter Site home page Giter Site logo

dockerized-github2gitlab's Introduction

Scheduled Github to Gitlab Sync

This project provides a docker-compose wrapper for Github2Gitlab with cron functionality.

The cronjobs-file runs by default every 5 minutes and can be adapted.

$ cat cronjobs
*/5 * * * * sh /run_cron.sh

It executes the run.sh, where your github2gitlab can be placed.

#!/bin/sh

github2gitlab --gitlab-url http://mygitlab.example.com --gitlab-token XXX --gitlab-repo test/test

More info how to use it you can find in the documentation, the sourcecode or executing the command with --help:

$ github2gitlab --help
  usage: github2gitlab [-h] --gitlab-url GITLAB_URL --gitlab-token GITLAB_TOKEN
                       [--gitlab-repo GITLAB_REPO] [--github-token GITHUB_TOKEN]
                       --github-repo GITHUB_REPO
                       [--ssh-public-key SSH_PUBLIC_KEY] [--branches BRANCHES]
                       [--ignore-closed] [--skip-pull-requests] [--verbose]
                       [--cache]
  
  migrate projects from GitHub to GitLab
  
  optional arguments:
    -h, --help            show this help message and exit
    --gitlab-url GITLAB_URL
                          Gitlab url
    --gitlab-token GITLAB_TOKEN
                          Gitlab authentication token
    --gitlab-repo GITLAB_REPO
                          Gitlab repo (for instance ceph/ceph)
    --github-token GITHUB_TOKEN
                          GitHub authentication token
    --github-repo GITHUB_REPO
                          GitHub repo (for instance ceph/ceph)
    --ssh-public-key SSH_PUBLIC_KEY
                          SSH public key
    --branches BRANCHES   comma separated list of git branches to mirror
                          (defaults to all)
    --ignore-closed       ignore pull requests closed and not merged
    --skip-pull-requests  do not mirror PR to MR
    --verbose             enable verbose (debug) logging
    --cache               cache GitHub pull requests list

Installation

Clone this repository

$ git clone https://github.com/rabbl/dockerized-github2gitlab.git github2gitlab
$ cd github2gitlab

Adapt the run.sh script with your information. Build and start the project with docker-compose:

$ docker-compose build
$ docker-compose up -d

To see if it's working check the logs:

$ docker-compose logs -f

dockerized-github2gitlab's People

Contributors

rabbl avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.