Giter Site home page Giter Site logo

snarehanger / redmine_gitlab_hook Goto Github PK

View Code? Open in Web Editor NEW

This project forked from phlegx/redmine_gitlab_hook

0.0 1.0 0.0 156 KB

This plugin allows you to update your local Git repositories in Redmine when changes have been pushed to GitLab.

License: MIT License

redmine_gitlab_hook's Introduction

Redmine GitLab Hook

This plugin allows you to update your local Git repositories in Redmine when changes have been pushed to GitLab.

Description

Redmine redmine.org has supported Git repositories for a long time, allowing you to browse your code and view your changesets directly in Redmine. For this purpose, Redmine relies on local clones of the Git repositories.

If your shared repository is on a remote machine - for example on GitLab - this unfortunately means a bit of legwork to keep the local, Redmine-accessible repository up-to-date. The common approach is to set up a cronjob that pulls in any changes with regular intervals and updates Redmine with them.

That approach works perfectly fine, but is a bit heavy-handed and cumbersome. The Redmine GitLab Hook plugin allows GitLab to notify your Redmine installation when changes have been pushed to a repository, triggering an update of your local repository and Redmine data only when it is actually necessary.

Installation

  1. Installing the plugin

    1. Follow the plugin installation procedure at www.redmine.org/wiki/redmine/Plugins.

    2. Restart your Redmine.

    3. If you already have a local Git repository set up and working from Redmine go to step 3, otherwise continue at step 2.

  2. Adding a Git repository to a project (note, this should work whether you want to use Redmine GitLab Hook or not). Simply follow the instructions at www.redmine.org/wiki/redmine/HowTo_keep_in_sync_your_git_repository_for_redmine . If the repository was cloned with “clone –mirror” please turn on the option “all_branches” in the plugin config page!

  3. Enable WS for repository management

    1. Go to Administration -> Settings -> Repositories

    2. Enable “Enable WS for repository management”

    3. Create a key by clicking on “Generate a key”

  4. Restart Redmine

  5. GitLab

    1. Go to the repository interface on GitLab.

    2. Under “Web Hooks” add a new “Post-Receive URL” of the format:

    Example:

    redmine.example.com/gitlab_hook?project_id=test_project&key=j2g7kds9341hj6sdk

    That’s it. GitLab will now send a HTTP POST to the Redmine GitLab Hook plugin whenever changes are pushed to GitLab. The plugin then takes care of pulling the changes to the local repository and updating the Redmine database with them.

Assumptions

  • GitLab >= 5.x

  • Redmine 2.x running on a *nix-like system. Older versions of redmine will not work.

  • Git 1.7.10 or higher available on the commandline. Also supports Git 1.8 repositories which are mirrored with the new “clone –mirror” command (default: off, please turn on in options when new mirror command was used).

redmine_gitlab_hook's People

Watchers

 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.