Defined Type: service::deploy::gitclone

Defined in:
modules/service/manifests/deploy/gitclone.pp

Overview

Class service::deploy::gitclone

Allows configuring a git repository to check out at the same location as scap would check it out

Parameters

prefix

is the prefix used to logically group

repositories on gerrit. e.g. 'mediawiki/services'.
repository

is the (short) repository name on gerrit that

should be cloned. e.g. 'parsoid'.

Parameters:

  • prefix (String[1]) (defaults to: 'mediawiki/services')
  • repository (String[1]) (defaults to: $title)


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'modules/service/manifests/deploy/gitclone.pp', line 14

define service::deploy::gitclone(
    String[1] $prefix = 'mediawiki/services',
    String[1] $repository = $title,
){

    $dir = "/srv/deployment/${title}"
    require ::service::deploy::common

    file { $dir:
        ensure => directory,
        owner  => 'root',
        group  => 'root',
        mode   => '0775',
    }

    git::clone { "${prefix}/${repository}":
        directory          => "${dir}/deploy",
        recurse_submodules => true,
        owner              => 'root',
        group              => 'wikidev',
        shared             => true,
        require            => File[$dir],
    }
}