Allow specifying repo ref as a class parameter
Having to create a custom fact to set project_config ref could be an overkill for some use cases, e.g. for setting up a third-party CI. Change-Id: I9772e10a3a56f900e56d425fe7bbfd2261360c1a
This commit is contained in:
parent
e6986d52f1
commit
61b5185672
|
@ -17,17 +17,15 @@
|
|||
|
||||
class project_config(
|
||||
$url = '',
|
||||
$revision = 'master',
|
||||
$base = '',
|
||||
) {
|
||||
|
||||
$config_dir = Vcsrepo['/etc/project-config']
|
||||
|
||||
# Note project_config_ref is expected to be provided by facter
|
||||
# if you want to use it.
|
||||
# Note project_config_ref can be provided by facter if you want to use it.
|
||||
if ($::project_config_ref != undef) {
|
||||
$revision = $::project_config_ref
|
||||
} else {
|
||||
$revision = 'master'
|
||||
}
|
||||
|
||||
if (!defined($config_dir)) {
|
||||
|
|
Loading…
Reference in New Issue