Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

jenkins-server (20) Versions 0.2.0

This cookbook installs a complete Jenkins server with plugins and is highly configurable with attributes in this cookbook.

Policyfile
Berkshelf
Knife
cookbook 'jenkins-server', '= 0.2.0', :supermarket
cookbook 'jenkins-server', '= 0.2.0'
knife supermarket install jenkins-server
knife supermarket download jenkins-server
README
Dependencies
Changelog
Quality -%

jenkins-server

This cookbook installs and configures a complete Jenkins server. The Jenkins server and plugins
are highly configurable with attributes in this cookbook.

Supported Platforms

  • CentOS >= 6.6
  • Ubuntu >= 14.04

These platforms are supported and tested, but it will probably work on other platforms to.

Attributes

  • node['jenkins-server']['host'] - Sets the Jenkins host for the Nginx template (optional).
  • node['jenkins-server']['admin']['username'] - Sets the username for the administrator user. Default "admin".
  • node['jenkins-server']['security']['chef-vault']['data_bag'] - Name of the data bag for jenkins users
  • node['jenkins-server']['security']['chef-vault']['data_bag_item'] - ID of the data bag to use as administrator user

...

Usage

jenkins-server::default

Include jenkins-server in your node's run_list:

json
{
  "run_list": [
    "recipe[jenkins-server::default]"
  ]
}

The default recipe includes the following recipies:

include_recipe 'jenkins-server::packages'
include_recipe 'jenkins-server::master'
include_recipe 'jenkins-server::security'
include_recipe 'jenkins-server::settings'
include_recipe 'jenkins-server::plugins'

Adding plugins

You can add plugins to the default['jenkins-server']['plugins'] array.

Plugins can be configured with groovy scripts. Test them at your Jenkins instance:
http://<host>:8080/script

With the doInspector method from javaworld.com
you can figure out the properties and methods of your plugin. The Jenkins core API documentation
can be found at http://javadoc.jenkins-ci.org.

def doInspector(obj) {
  def inspector = new groovy.inspect.Inspector(obj)
  def inspectorReport = new StringBuilder()
  inspectorReport << "Object under inspection "
  inspectorReport << (inspector.isGroovy() ? "IS" : "is NOT") << " Groovy!\n"
  inspectorReport << "METHODS\n"
  def methods = inspector.methods
  methods.each {
    inspectorReport << "\t" << it.toString() << "\n"
  }
  inspectorReport << "\nMETA METHODS\n"
  def metaMethods = inspector.metaMethods
  metaMethods.each {
    inspectorReport << "\t" << it.toString() << "\n"
  }
  inspectorReport << "\nPROPERTY INFO\n"
  def properties = inspector.propertyInfo
  properties.each {
    inspectorReport << "\t" << it.toString() << "\n"
  }
  println inspectorReport
}

Add a Jenkins plugin "myplugin" like below. You can specify a version. If you want to configure it, set configure to true
and specify a cookbook and recipe. Use the jenkins_script resource to configure your plugin with a groovy script.
Take a look at the plugin recipes in this cookbook for examples.

default['jenkins-server']['plugins']['myplugin'] = {
  'version' => '1.0',
  'configure' => true,
  'cookbook' => 'mycookbook',
  'recipe' => 'myrecipe_plugin_example'
}

License

The MIT License (MIT)

Authors

Author:: Pieter Vogelaar (pieter@pietervogelaar.nl)

Dependent cookbooks

jenkins >= 2.3.1
java >= 0.0.0
ant >= 0.0.0
git >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

0.2.0

  • Added configurable plugins
  • Added configurable Jenkins settings
  • Added Java, Ant and Git package

0.1.1

  • Documentation improvements
  • Better attribute defaults

0.1.0

Initial release of jenkins-server

No quality metric results found