Merge "Allow specifying repo ref as a class parameter"

This commit is contained in:
Jenkins 2015-08-21 19:12:24 +00:00 committed by Gerrit Code Review
commit 0ae88c3203
1 changed files with 7 additions and 6 deletions

View File

@ -17,24 +17,25 @@
class project_config( class project_config(
$url, $url,
$revision = 'master',
$base = undef, $base = undef,
) { ) {
$config_dir = Vcsrepo['/etc/project-config'] $config_dir = Vcsrepo['/etc/project-config']
# Note project_config_ref is expected to be provided by facter # Note project_config_ref can be provided by facter if you want to use it.
# if you want to use it.
if ($::project_config_ref != undef) { if ($::project_config_ref != undef) {
$revision = $::project_config_ref $_revision = $::project_config_ref
} else { }
$revision = 'master' else {
$_revision = $revision
} }
if (!defined($config_dir)) { if (!defined($config_dir)) {
vcsrepo { '/etc/project-config': vcsrepo { '/etc/project-config':
ensure => latest, ensure => latest,
provider => git, provider => git,
revision => $revision, revision => $_revision,
source => $url, source => $url,
} }
} }