Jenkins + Rspec + Puppet setup

458 views
Skip to first unread message

Choon Ming Goh

unread,
Dec 24, 2012, 6:22:59 AM12/24/12
to puppet...@googlegroups.com
Hi all,

I'm trying to setup Jenkins in our environment in order to do automated testing with all the modules that we have in github. I'm facing a few problem and hope someone can help me out here give me a pointer.

1. Jenkins setup:

I'm trying to setup similar to puppetlab's http://jenkins.puppetlabs.com. I've setup RVM on the jenkins home dir (/var/lib/jenkins) and have a few plugins ready. I'm trying to achieve a similar result as https://jenkins.puppetlabs.com/job/Puppet%20Module%20-%20firewall/ but I'm not sure how I can do that.

How can I setup the configuration matrix? I already have two versions of ruby installed in the /var/lib/jenkins via rvm. How am I to choose which version of puppet gem to use or which ruby version to use when running the test?

jenkins@server05:~$ rvm list

rvm rubies

=* ruby-1.8.7-p371 [ x86_64 ]
   ruby-1.9.3-p327 [ x86_64 ]

# => - current
# =* - current && default
#  * - default


Plugins

Name  ↓Version   Enabled   Pinned   
mailer1.4truefalse
external-monitor-job1.1truefalse
ldap1.2truetrue
pam-auth1.0truefalse
javadoc1.0truefalse
maven-plugin1.494truetrue
promoted-builds2.8truefalse
ant1.1truefalse
rake1.7.7truefalse
github-api1.33truefalse
git1.1.26truefalse
github1.4truefalse
ssh2.3truefalse
cvs2.7truetrue
ruby1.2truefalse
ruby-runtime0.10truefalse
rvm0.3truefalse
ssh-slaves0.22truetrue
translation1.10truetrue
subversion1.44truetrue

2. Rspec-puppet testing
Being fairly new to this, I tried using puppetlabs-firewall module from their official github repo and add it as a job in the jenkins. Result is that most of I encountered failures all over the place. Can someone point to me where I've gone wrong? I've attached the setup for the build below and the gem list

You can find the build output here: http://pastebin.com/qE0t19AT

All help is very very very much appreciated!!

jenkins@server05:~$ gem list

*** LOCAL GEMS ***

bundler (1.2.3)
diff-lcs (1.1.3)
facter (1.6.16)
hiera (1.0.0)
metaclass (0.0.1)
mocha (0.13.1, 0.11.4)
puppet (3.0.1)
puppetlabs_spec_helper (0.3.0)
rake (10.0.3, 10.0.2, 0.9.2.2)
rspec (2.12.0, 2.10.0)
rspec-core (2.12.2, 2.12.1, 2.10.1)
rspec-expectations (2.12.1, 2.12.0, 2.10.0)
rspec-mocks (2.12.1, 2.12.0, 2.10.1)
rspec-puppet (0.1.5)
rubygems-bundler (1.1.0)
rvm (1.11.3.5)


Choon Ming Goh

unread,
Dec 24, 2012, 6:25:07 AM12/24/12
to puppet...@googlegroups.com

This is the build configuration screenshot


Reply all
Reply to author
Forward
0 new messages