Puppet Class: profile::ci::package_builder

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

Overview

Class profile::ci::package_builder

Setup cow images and jenkins-debian-glue



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
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'modules/profile/manifests/ci/package_builder.pp', line 5

class profile::ci::package_builder {

    # Shell script wrappers to ease package building
    # Package generated via the mirror operations/debs/jenkins-debian-glue.git

    # jenkins-debian glue puppetization:
    file { '/srv/pbuilder':
        ensure  => directory,
        # On extended disk provided by ci::slave::labs::common
        require => Mount['/srv'],
    }

    file { '/var/cache/pbuilder':
        ensure  => link,
        target  => '/srv/pbuilder',
        require => File['/srv/pbuilder'],
    }

    class { '::package_builder':
        # We need /var/cache/pbuilder to be a symlink to /srv
        # before cowbuilder/pbuilder is installed
        require  => [
            File['/var/cache/pbuilder'],
            File['/srv/pbuilder'],
        ],
        # Cowdancer is confused by /var/cache/pbuilder being a symlink
        # causing it to fail to properly --update cow images. T125999
        basepath => '/srv/pbuilder',
    }

    ensure_resource(
      'apt::repository',
      'component-ci',
      {
        'uri'        => 'http://apt.wikimedia.org/wikimedia',
        'dist'       => "${::lsbdistcodename}-wikimedia",
        'components' => 'component/ci',
        'source'     => false,
      }
    )
    package { [
        'jenkins-debian-glue',
        'jenkins-debian-glue-buildenv',
        ]:
            ensure  => present,
            require => [
              Apt::Repository['component-ci'],
              # cowbuilder file hierarchy needs to be created after the symlink
              # points to the mounted disk.
              File['/var/cache/pbuilder'],
            ],
    }

}