Puppet Class: profile::ci::jenkins

Defined in:
modules/profile/manifests/ci/jenkins.pp

Overview

jenkins_prefix

The HTTP path used to reach the Jenkins instance. Must have a leading slash. Default: '/ci'.

Parameters:

  • prefix (Stdlib::Unixpath) (defaults to: lookup('profile::ci::jenkins::prefix'))
  • service_ensure (Variant[Enum['running', 'stopped'], Boolean]) (defaults to: lookup('profile::ci::jenkins::service_ensure'))
  • service_enable (Variant[Enum['mask', 'manual'], Boolean]) (defaults to: lookup('profile::ci::jenkins::service_enable'))
  • service_monitor (Boolean) (defaults to: lookup('profile::ci::jenkins::service_monitor'))
  • builds_dir (Stdlib::Unixpath) (defaults to: lookup('profile::ci::jenkins::builds_dir'))
  • workspaces_dir (Stdlib::Unixpath) (defaults to: lookup('profile::ci::jenkins::workspaces_dir'))
  • java_home (Stdlib::Unixpath) (defaults to: lookup('profile::ci::jenkins::java_home'))


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'modules/profile/manifests/ci/jenkins.pp', line 5

class profile::ci::jenkins(
    Stdlib::Unixpath $prefix = lookup('profile::ci::jenkins::prefix'),
    Variant[Enum['running', 'stopped'], Boolean] $service_ensure = lookup('profile::ci::jenkins::service_ensure'),
    Variant[Enum['mask', 'manual'], Boolean] $service_enable = lookup('profile::ci::jenkins::service_enable'),
    Boolean $service_monitor = lookup('profile::ci::jenkins::service_monitor'),
    Stdlib::Unixpath $builds_dir = lookup('profile::ci::jenkins::builds_dir'),
    Stdlib::Unixpath $workspaces_dir = lookup('profile::ci::jenkins::workspaces_dir'),
    Stdlib::Unixpath $java_home = lookup('profile::ci::jenkins::java_home'),
) {
    include ::profile::java
    Class['::profile::java'] ~> Class['::jenkins']

    # Load the Jenkins module, that setup a Jenkins master
    class { '::jenkins':
        access_log      => true,
        http_port       => 8080,
        prefix          => $prefix,
        umask           => '0002',
        service_ensure  => $service_ensure,
        service_enable  => $service_enable,
        service_monitor => $service_monitor,
        builds_dir      => $builds_dir,
        workspaces_dir  => $workspaces_dir,
        java_home       => $java_home,
    }

    # Templates for Jenkins plugin Email-ext.
    file { '/var/lib/jenkins/email-templates':
        ensure => directory,
        mode   => '0755',
        owner  => 'root',
        group  => 'root',
    }
    file { '/var/lib/jenkins/email-templates/wikimedia.template':
        source  => 'puppet:///modules/contint/jenkins-email-template',
        mode    => '0444',
        owner   => 'root',
        group   => 'root',
        require => File['/var/lib/jenkins/email-templates'],
    }
}