Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Joris VAN ACOLEYEN committed Aug 2, 2024
1 parent 3beae78 commit 6bdb110
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
6 changes: 3 additions & 3 deletions manifests/config/project.pp
Original file line number Diff line number Diff line change
Expand Up @@ -115,21 +115,21 @@
}
)

$scm_config.each |$integration, $type, $config| {
$scm_config.each |$integration, $config| {
file { "${projects_dir}/${name}/scm-${integration}.json":
ensure => file,
owner => $owner,
group => $group,
mode => '0644',
content => stdlib::to_json($config),
content => stdlib::to_json($config['config']),
}

$_command = [
'env RD_FORMAT=default',
'rd projects scm setup',
"-p '${name}'",
"-i ${integration}",
"-t ${type}",
"-t ${config['type']}",
"-f ${projects_dir}/${name}/scm-${integration}.json",
].join(' ')

Expand Down
32 changes: 22 additions & 10 deletions types/scm.pp
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
# @summary Rundeck scm type.
type Rundeck::Scm = Struct[{
Optional['import'] => Struct[{
'type' => String[1],
'config' => Hash[String[1], String],
}],
Optional['export'] => Struct[{
'type' => String[1],
'config' => Hash[String[1], String],
}],
}]
type Rundeck::Scm = Variant[
Struct[{
'import' => Struct[{
'type' => String[1],
'config' => Hash[String[1], String],
}],
Optional['export'] => Struct[{
'type' => String[1],
'config' => Hash[String[1], String],
}],
}],
Struct[{
'export' => Struct[{
'type' => String[1],
'config' => Hash[String[1], String],
}],
Optional['import'] => Struct[{
'type' => String[1],
'config' => Hash[String[1], String],
}],
}],
]

0 comments on commit 6bdb110

Please sign in to comment.