Skip to content
forked from gitlabhq/gitlabhq

A fork of Gitlab Community Edition, reconfigured as a Rails mountable engine

License

Notifications You must be signed in to change notification settings

mr-vinn/gitlabhq

 
 

Repository files navigation

Gitlab: The Engine

This is a fork of the Gitlab Community Edition project. I am not affiliated in any way with the official Gitlab project or with Gitlab B.V.

This fork aims to repackage the Gitlab Community Edition application into a Rails Mountable Engine so that you can easily embed a self-hosted Gitlab instance into a custom Rails application. You can already interact with a Gitlab instance from your own Rails app via the Gitlab API, and with web hooks and system hooks. The API lets you view and manipulate Gitlab's objects, and your application can use web and system hooks to respond to Gitlab's events. You can interact with Gitlab in the same ways when you use it as a mountable engine, but doing so means that you only deal with a single application and database. Deploying with the Gitlab engine is the same as with Gitlab itself,

See my gitlab-engine-examples project for some simple apps that build functionality on top of Gitlab.

Maintenance Process

The master branch of this project pulls from the master branch of Gitlab's Github repository. This README is the only file that diverges from upstream. Commits from upstream are merged whenever Gitlab releases a new stable version, using the merge base between the upstream master and the latest x-x-stable branch.

The namespace branch is functionally identical to the official Gitlab app, but Ruby classes and view files are moved into a namespaced directory tree. After merging a new upstream release into our master branch, the master branch is merged into namespace. After resolving merge conflicts, additional commits are made on this branch as necessary to make Rspec and Spinach tests pass. When all tests pass, a new branch is checked out named x-x-stable-namespace. Each stable branch receives security and bug fixes from the corresponding upstream x-x-stable branch.

The engine branch is based on the namespace branch, but is configured as a mountable engine instead of a standalone Rails application. This branch receives updates from namespace after new upstream releases are merged. When namespace->engine merge conflicts are resolved, the engine is tested with a dummy application created for the engine branch. When all tests pass, a new branch is checked out named x-x-stable-engine. These stable branches receive security and bug fixes from the upstream x-x-stable branches.

Using Gitlab as an Engine

To add the Gitlab engine to your Rails app, update your Gemfile with something like this:

gem 'gitlab', '6.9.0', :github => 'mr-vinn/gitlab', :branch => '6-9-stable-engine'

You can use one of the x-x-stable-engine branches, or the engine branch directly. The x-y-z tags are only available on the stable engine branches, so if you want to configure a specific version of gitlab in your app then you should use the appropriate x-x-stable-engine branch.

NOTE: The rest of this document is the official Gitlab Community Edition README

GitLab

Open source software to collaborate on code

logo

animated-screenshots

  • Manage Git repositories with fine grained access controls that keep your code secure
  • Perform code reviews and enhance collaboration with merge requests
  • Each project can also have an issue tracker and a wiki
  • Used by more than 100,000 organizations, GitLab is the most popular solution to manage Git repositories on-premises
  • Completely free and open source (MIT Expat license)
  • Powered by Ruby on Rails

Canonical source

Code status

  • build status on ci.gitlab.org (master branch)

  • Code Climate

  • Coverage Status

  • PullReview stats

Website

On www.gitlab.com you can find more information about:

Third-party applications

Access GitLab from multiple platforms with applications below. These applications are maintained by contributors, GitLab B.V. does not offer support for them.

Requirements

  • Ubuntu/Debian/CentOS/RHEL**
  • ruby 2.0+
  • git 1.7.10+
  • redis 2.0+
  • MySQL or PostgreSQL

** More details are in the requirements doc.

Installation

Please see the installation page on the GitLab website.

New versions

Since 2011 a minor or major version of GitLab is released on the 22nd of every month. Patch and security releases come out when needed. New features are detailed on the blog and in the changelog. For more information about the release process see the release documentation. Features that will likely be in the next releases can be found on the feature request forum with the status started and completed.

Upgrading

For updating the the Omnibus installation please see the update documentation. For manual installations there is an upgrader script and there are upgrade guides.

Run in production mode

The Installation guide contains instructions on how to download an init script and run it automatically on boot. You can also start the init script manually:

sudo service gitlab start

or by directly calling the script:

 sudo /etc/init.d/gitlab start

Please login with root / 5iveL!fe.

Install a development environment

We recommend setting up your development environment with the cookbook. If you do not use the cookbook you might need to copy the example development unicorn configuration file

cp config/unicorn.rb.example.development config/unicorn.rb

Run in development mode

Start it with Foreman

bundle exec foreman start -p 3000

or start each component separately:

bundle exec rails s
bin/background_jobs start

And surf to localhost:3000 and login with root / 5iveL!fe.

Run the tests

  • Run all tests:

    bundle exec rake test
    
  • RSpec unit and functional tests.

    All RSpec tests: bundle exec rake spec

    Single RSpec file: bundle exec rspec spec/controllers/commit_controller_spec.rb

  • Spinach integration tests.

    All Spinach tests: bundle exec rake spinach

    Single Spinach test: bundle exec spinach features/project/issues/milestones.feature

Documentation

All documentation can be found on doc.gitlab.com/ce/.

Getting help

Please see Getting help for GitLab on our website for the many options to get help.

Is it any good?

Yes

Is it awesome?

Thanks for asking this question Joshua. These people seem to like it.

About

A fork of Gitlab Community Edition, reconfigured as a Rails mountable engine

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 86.1%
  • CSS 5.9%
  • CoffeeScript 5.4%
  • JavaScript 1.8%
  • Shell 0.8%