Forge Home

jjb

Management for OpenStack's Jenkins Job Builder

8,980 downloads

7,538 latest version

4.3 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 1.0.2 (latest)
  • 1.0.1
  • 1.0.0
released May 23rd 2016
This version is compatible with:
  • Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >=4.0.0 <5.0.0
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'tykeal-jjb', '1.0.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add tykeal-jjb
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install tykeal-jjb --version 1.0.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

tykeal/jjb — version 1.0.2 May 23rd 2016

jjb

Build Status

Table of Contents

  1. Description
  2. Setup - The basics of getting started with jjb
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module

Description

Installs and configures Jenkins Job Builder (JJB).

Does not create JJB layouts. In all honesty that is better served out of separate repo that is either dedicated to it or to other CI related components and having jobs built into your CI to do validation and instantiation into your CI.

Setup

What jjb affects

  • Install jenkins-job-builder via pip or from a system package
  • Optionally install via source repository
  • Optionally install into a virtualenv

Setup Requirements

If installing into a virtualenv then please make sure that you instantiate stankevich/python in a way that installs the needed system components.

NOTE The default of stankevich/python is to ensure that the python development tools are absent but they are a requirement for python-virtualenv on RedHat family distributions.

Beginning with jjb

Installing a basic setup (this will not properly connect to a jenkins but it will install cleanly)

class { 'jjb':
}

A more appropriate configuration would be something along the lines of

class { 'jjb':
  config       => {
    jenkins    => {
      user     => 'jobbuilder',
      password => 'Super_$ecRet_p@$$w0rd!',
      url      => 'https://jenkins.example.com'
    },
  },
}

Usage

This module is really mostly designed to get JJB installed and configured so that it can talk with a Jenkins instance. Managing JJB layouts is best left for jobs living inside Jenkins itself. For an example of how to hook configure your Jenkins system to validate and manage updating your Jenkins against a Gerrit system I would recommend looking at the following configurations:

OpenDaylight releng/builder

FD.io ci-management

Zephyr Projection ci-management

Reference

Class: jjb

config A configuration hash that defines how the jenkins_jobs.ini is created. Each section of the ini file is defined by it's own named subhash. At present JJB understands the following sections:

jenkins This is a mandatory section for JJB and if it is not defined will default to example values

hipchat This is an option section for JJB and if not set will not be added to the configuration file

This hash is utilized by tykeal/ini_config to create the configuration. Outside of merging defaults in for the jenkins section it is passed unmodified. See the documentation of tykeal/ini_config for more details.

install_type Valid options are 'package', 'system', or 'venv' with a default of 'system'.

This option determins how JJB will be installed.

'system' will use pip to install into the base system itself

'venv' will install into a virtualenv that is created specifically for the install

'package' will attempt to install using the system package management. As JJB is not in all upstream repos you will need to make sure that the repo that you're installing from is already configured on the system should you choose to utilize this option.

install_via_source If true then a checkout of JJB will be made and utilized for installation into either the system or a venv. If install_type is 'package' than this option is ignored. Defaults to false.

ini_dir The directory where the inifile should be created. Defaults to '/etc/jenkins_jobs'

ini_file The configuration file that should be managed. Defaults to '/etc/jenkins_jobs/jenkins_jobs.ini'

ini_group The owning group for the inifile. Defaults to 'root'

ini_mode The file mode for the inifile. Defaults to '0440'

ini_owner The owning user for the inifile. Defaults to 'root'

manage_ini_dir If true then ini_dir will be created. Defaults to true

package_name The name of the package to install. Defaults to 'jenkins-job-builder'

package_version The version of the package to install. Defaults to 'present'. Other options are 'absent', 'latest' or a specific version.

vcs_info A configuration hash for use if installing via source. The options are used to drive the configuration of a vcsrepo resource. The default hash is configured as follows. This hash is useful only if install_via_source is true

vcs_info = {
  vcs_path   => '/opt/vcs_jenkins_job_builder',
  vcs_ref    => 'master',
  vcs_source => 'https://git.openstack.org/openstack-infra/jenkins-job-builder.git',
  vcs_type   => 'git',
}

venv_path The path for the virtualenv if install_type is 'venv'. Defaults to '/opt/venv_jenkins_job_builder'

Limitations

This module has only been tested on RedHat / CentOS 7. It should work properly on any system that also supports stankevich/python.

Development

Fork it on GitHub and send a PR