GithubHelp home page GithubHelp logo

yongjhih / gitlab-ci-runner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gitlabhq/gitlab-ci-runner

0.0 2.0 0.0 139 KB

Continuous integration server for gitlabhq | Runner

Home Page: http://blog.gitlab.org/announcing-gitlab-ci-3.0/

License: MIT License

Shell 21.84% Ruby 78.16%

gitlab-ci-runner's Introduction

GitLab CI is an open-source continuous integration server

Code Climate

Screen

This is Runner repository. This code will only run tests. For more information and the test coordinator please see the gitlab-ci repo.

Requirements

This project is designed for the Linux operating system.

We officially support (recent versions of) these Linux distributions:

  • Ubuntu Linux
  • Debian/GNU Linux

Mac OSX and other POSIX operating systems are not supported but will work with adaptations.

Under Windows the runner will only work under POSIX compliant environments like Cygwin.

To run GitLab CI we recommend using GitLab 6.0 or higher, for LDAP login this is required.

Installation

Install operating system dependent dependencies:

a) Linux

sudo apt-get update -y
sudo apt-get install -y wget curl gcc libxml2-dev libxslt-dev libcurl4-openssl-dev libreadline6-dev libc6-dev libssl-dev make build-essential zlib1g-dev openssh-server git-core libyaml-dev postfix libpq-dev libicu-dev

b) MacOSX (make sure you have homebrew installed)

sudo brew install icu4c

Install Ruby from source:

a) Linux

mkdir /tmp/ruby
cd /tmp/ruby
curl --progress http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz | tar xz
cd ruby-1.9.3-p392
./configure
make
sudo make install

b) MacOSX (make sure you have the Xcode command line tools installed), UNTESTED

brew update
brew install rbenv
brew install ruby-build
brew install openssl
CC=gcc-4.7 RUBY_CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl` --with-readline-dir=`brew --prefix readline` --with-gcc=gcc-4.7 --enable-shared" rbenv install 1.9.3-p392
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.profile
rbenv global 1.9.3-p194

Download the code for the runner:

[make sure you install any system dependancies first]

cd /home/gitlab_ci_runners
git clone https://github.com/gitlabhq/gitlab-ci-runner.git
cd gitlab-ci-runner

Install the gems for the runner:

sudo gem install bundler
sudo -u gitlab_ci_runner -H bundle install --deployment

Setup the runner interactively:

bundle exec ./bin/setup

Setup the runner non-interactively:

CI_SERVER_URL=https://ci.example.com REGISTRATION_TOKEN=replaceme bundle exec ./bin/setup

SSH into your GitLab server and confirm to add host key to known_hosts:

ssh git@<your gitlab url>

Run

bundle exec ./bin/runner

Autostart Runners

On Linux machines you can have your runners operate like daemons with the following steps

# make sure you install any system dependancies first

administrator@server:~$ sudo adduser --disabled-login --gecos 'GitLab CI Runner' gitlab_ci_runner
administrator@server:~$ sudo su gitlab_ci_runner
gitlab_ci_runner@server:/home/administrator$ cd ~/

# perform the setup above

gitlab_ci_runner@server:~$ exit;
gitlab_ci_runner@server:/home/gitlab_ci_runner$ sudo cp ./gitlab-ci-runner/lib/support/init.d/gitlab_ci_runner /etc/init.d/gitlab-ci-runner
gitlab_ci_runner@server:/home/gitlab_ci_runner$ cd ~
administrator@server:~$ sudo chmod +x /etc/init.d/gitlab-ci-runner
administrator@server:~$ sudo update-rc.d gitlab-ci-runner defaults 21 
administrator@server:~$ sudo service gitlab-ci-runner start

gitlab-ci-runner's People

Contributors

dosire avatar dzaporozhets avatar endzyme avatar yongjhih avatar airtonix avatar dukex avatar drinchev avatar jacobvosmaer avatar jojosch avatar jtreml avatar paul91 avatar raymiiorg avatar razer6 avatar

Watchers

James Cloos 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.