Skip to content

Latest commit

 

History

History
59 lines (46 loc) · 2.38 KB

Installation.md

File metadata and controls

59 lines (46 loc) · 2.38 KB

Installation Steps

  1. Install Plugin
  2. Mongodb setup
  3. Github oauth plugin configuration
  4. DotCi plugin configuration
  5. Configure package management

Install Plugin

  • Install DotCi plugin from the update center. This should automatically install github-oauth-plugin

Mongodb setup

Install mongodb accessible to your Jenkins instance.

Github oauth plugin configuration

  • Register an OAuth application with github to obtain Client-ID/Secret.

  • Go to Manage Jenkins > Configure Global Security Under Security Realm select Github Authentication Plugin and fill out required oauth credentials.

DotCi plugin configuration

Got to Manage Jenkins> Configure System and fill out required information under DotCi Configuration

dotci setup

####Private Repository configuration Setting this up would use repo github oauth scope when users login. dotci private repo config

Configure package management

There are two options for installing packages that the build needs,

  • Docker - Install docker on jenkins slaves where builds would run.
  • Non-Docker - DotCi calls a bash function 'install_packages' with requested packages and languages specified in the enviroment section of .ci.yml. It is up to you to provide implementation of this shell function available to jenkins slave running dotci build.

Here is an example of of install_packages function using rvm for ruby builds

  # A .ci.yml with the following declaration
    environment:
       language: ruby
       language_version: 1.9.3
    would call install_packages ruby-1.9.3
  function install_packages(){
    gemset=`echo ${PWD##*/} | tr ',' '_'`
    set +e
    if [[ $1 =~ "ree" ]]; then
      rvm use `echo $1 | sed -e "s/^ruby-//g" -e "s/_/-/g"`@$gemset --create
    elif [[ $1 =~ "jruby" ]]; then
      rvm use `echo $1 | sed -e "s/^ruby-//g" -e "s/_/-/g"`@$gemset --create
    else
      rvm use `echo $1 | sed -e "s/_/-/g"`@$gemset --create
    fi
    rvm gemset empty --force
    set -e
  }