Puppet Class: profile::ci::proxy_jenkins

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

Overview

SPDX-License-Identifier: Apache-2.0

Class contint::proxy_jenkins

A http proxy in front of Jenkins

http_port

HTTP port for a Jenkins instance webservice. Example: 8080

prefix

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

Parameters:

  • http_port (Stdlib::Port) (defaults to: lookup('profile::ci::proxy_jenkins::http_port'))
  • prefix (String) (defaults to: lookup('profile::ci::proxy_jenkins::prefix'))


13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'modules/profile/manifests/ci/proxy_jenkins.pp', line 13

class profile::ci::proxy_jenkins (
    Stdlib::Port $http_port = lookup('profile::ci::proxy_jenkins::http_port'),
    String $prefix = lookup('profile::ci::proxy_jenkins::prefix'),
) {

  # run jenkins behind Apache and have pretty URLs / proxy port 80
  # https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache

  file {
    '/etc/apache2/conf.d/jenkins_proxy':
      ensure => absent,
  }

  file {
    '/etc/apache2/jenkins_proxy':
      owner   => 'root',
      group   => 'root',
      mode    => '0444',
      content => template('contint/apache/proxy_jenkins.erb'),
  }

}