Skip to content

Instantly share code, notes, and snippets.

@jkeroes
Created June 26, 2013 23:12
Show Gist options
  • Save jkeroes/5872591 to your computer and use it in GitHub Desktop.
Save jkeroes/5872591 to your computer and use it in GitHub Desktop.

=== CI

== Problem

autoprove (Test::Continous) broken in 5.18.0 Smolder is broken on OSX in 5.12+

== Solution

Jenkins. A fork of Hudson. Mature, supports many plugins.

== OSX installation

Install from http://jenkins-ci.org/

don't use brew install jenkins - it's old.

cpanm -S Task::Jenkins

perlbrew switch export JAVA_OPTS="-Xms256m -Xmx512m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled" java -jar /usr/local/opt/jenkins/libexec/jenkins.war

== Jenkins configuration

Jenkins menu | Manage Jenkins | Manage Plugins

  1. Git Client Plugin
  2. Git Plugin
  3. Instant Messaging Plugin
  4. IRC Plugin
  5. Growl Plugin
  6. Redmine Plugin
  7. Active Directory plugin
  8. Perl Plugin
  9. Green Balls
  10. Dashboard View (ruby-runtime may be added automatically)

Deactivate:

  1. CVS
  2. Svn

Jenkins menu | Manage Jenkins | Configure System

= Global properties

[x] Environment variables PERLBREW_HOME: /opt/perlbrew PERLBREW_ROOT: /opt/perlbrew

= Git plugin

Global Config user.name Value: Jenkins CI Global Config user.email Value: [email protected] # or a role account

= Growl

Global password: RingRing

= Shell

Shell executable: /bin/bash

= IRC

[x] Enable IRC Notification Hostname: as7585.integra.net Port: 6667

= Email-notification

SMTP server: resay.integra.net Default email suffix: @integratelecom.com

== Configure Jenkins Git user

https://wiki.jenkins-ci.org/display/JENKINS/Gitolite

  1. Create ssh-key for user jenkins.
  2. Copy to gitolite-admin/keydir/ as jenkins_rsa.pub
  3. Add jenkins_rsa to readonly users in gitolite-admin/conf/gitolite.conf
  4. git commit -am 'Add jenkins' && git push

== Configure Global Security

TBD

== Configure Dashboard View

On main page, click the [+] tab. Name it "" Add everything.

== Jenkins project configuration

= Source Code Management

[x] Git

Repository URL: git@git:CA-API

= Build triggers:

[x] Poll SCM Schedule: # every 20 minutes M-F H/20 * * * 1-5

= Build

Execute Shell | Add build step

source /opt/perlbrew/etc/bashrc
perlbrew use perl-5.16.2@dev
/opt/perlbrew/libs/perl-5.16.2@dev/bin/prove -r --timer --formatter=TAP::Formatter::JUnit -l t

= Add post-build action: Growl

Growl IP:

Also add passsword "RingRing" to System Preferences | Growl.

= Add post-build action: IRC Notication

  1. Click Advanced Channel Name: #ci Notification Strategy: change

Dealing with Java heap errors on OSX:

Submitted a pull request with sane defaults to github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment