Installation Steps
- Install Plugin
- Mongodb setup
- Github oauth plugin configuration
- DotCi plugin configuration
- Configure package management
- Install DotCi plugin from the update center. This should automatically install github-oauth-plugin
Install mongodb accessible to your Jenkins instance.
-
Register an OAuth application with github to obtain Client-ID/Secret.
-
Go to
Manage Jenkins
>Configure Global Security
UnderSecurity Realm
selectGithub Authentication Plugin
and fill out required oauth credentials.
Got to Manage Jenkins
> Configure System
and fill out required information under DotCi Configuration
####Private Repository configuration
Setting this up would use repo
github oauth scope when users login.
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
}