Jenkins setup cookbook

I’ve been trying to create a cookbook that sets up Jenkins on an Ubuntu node, prefilled with a the github plugin a git repository and a build script.

Well I’ve gotten as far as getting Jenkins setup with the plugins I need (I found that running the script 2-3 times will get the result I need).

Then I went into the Jenkins dashboard to try to create a job ‘config.xml’ that I could use as a template. The problem that I found was that if I run Jenkins anonymously, I don’t get access to installed Ruby.

So then the question became: how do I setup basic auth using chef? Is it even possible?

My first two questions would be;

  1. How did you install Ruby via the cookbook?
  2. How are you running Jenkins 'anonymously'?

Cheers,
Mike Dillion

On Fri, Sep 27, 2013 at 1:08 PM, Michael Hayes hayesmp@thefrontside.netwrote:

I've been trying to create a cookbook that sets up Jenkins on an Ubuntu
node, prefilled with a the github plugin a git repository and a build
script.

Well I've gotten as far as getting Jenkins setup with the plugins I need
(I found that running the script 2-3 times will get the result I need).

Then I went into the Jenkins dashboard to try to create a job 'config.xml'
that I could use as a template. The problem that I found was that if I run
Jenkins anonymously, I don't get access to installed Ruby.

So then the question became: how do I setup basic auth using chef? Is it
even possible?

Ruby/rbenv recipe:

include_recipe "rbenv::default"
include_recipe "rbenv::ruby_build"

node["rackbox"]["ruby"]["versions"].each do |rb_version|

rbenv_ruby rb_version do
global(node["rackbox"]["ruby"]["global_version"] == rb_version)
end
rbenv_gem "bundler" do
ruby_version rb_version
end

end

You can run jenkins jobs without first setting up a user.

Console Output

Started by user anonymous

On Sep 27, 2013, at 2:14 PM, Mike Dillion mike.dillion@gmail.com wrote:

My first two questions would be;

  1. How did you install Ruby via the cookbook?
  2. How are you running Jenkins 'anonymously'?

Cheers,
Mike Dillion

On Fri, Sep 27, 2013 at 1:08 PM, Michael Hayes hayesmp@thefrontside.net wrote:
I've been trying to create a cookbook that sets up Jenkins on an Ubuntu node, prefilled with a the github plugin a git repository and a build script.

Well I've gotten as far as getting Jenkins setup with the plugins I need (I found that running the script 2-3 times will get the result I need).

Then I went into the Jenkins dashboard to try to create a job 'config.xml' that I could use as a template. The problem that I found was that if I run Jenkins anonymously, I don't get access to installed Ruby.

So then the question became: how do I setup basic auth using chef? Is it even possible?