Skip to content
/ git-ci Public
forked from ehildenb/git-ci

Tools for CI servers centered around Git

License

Notifications You must be signed in to change notification settings

dapphub/git-ci

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git CI

This is a suite of tools for making a CI server which handles Git repositories.

CI User Setup

Create a user which will be used for CI activities. This assumes you have admin access to the server.

sudo useradd -m -s `which git-shell` ci

To change into that user, run:

sudo su -s `which bash` ci

Setup the user to your preferences. Remember to add SSH access for users who you want to be able to admin the CI-server.

Repo Setup

The following are run as the ci user created above on your CI server.

Setup src and git/src directories.

cd ~/
mkdir -p ~/git/src ~/src

Setup src/git-ci to track git/src/git-ci.git:

cd ~/git/src
git init --bare git-ci.git
cd ~/src
git clone ~/git/src/git-ci.git

Push the correct version of the git-ci repo to the server (on your local machine):

git remote add ci 'ssh://CI-SERVER/~/git/src/git-ci.git'
git push ci --all

Back on the server, pull down the changes:

cd ~/src/git-ci
git pull

Also symlink the git-shell-commands directory to enable remote git-shell access:

cd ~/
ln -s src/git-ci/git-shell-commands

And make sure that the PATH variable includes the bin directory for git-ci (add to your ~/.bashrc):

export PATH="$PATH:/path/to/ci/src/git-ci/bin"

Git Tools

Shell Commands

Directory bin contains extra git commands which help with using this tool.

  • git-ci is the main test executor.
  • git-replay allows replaying an existing git commit.
  • git-rebased-on checks if the given pair of commits are related ancestrally.

Interactive Server git-shell

Directory git-shell-commands contains helpful commands for admins of the CI server.

  • help lists the available commands.
  • sync syncs the checked out version of the CI repo with the bare version.
  • bb provides a simple interface to a running instance of Buildbot.

Git Hooks

Symlink to these hooks in the relevant repositories to enable them.

  • post-receive.ci-requests: insert a git-ci request into the queue of requests to be run on push.
  • post-receive.sync-bb: automatically sync the git-ci checked out repository on pushes to the bare repository.

CI Servers

Buildbot

Directory buildbot contains instructions for setting up Buildbot and a sample config.

About

Tools for CI servers centered around Git

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 69.9%
  • Python 30.1%