Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate configuration of SCM export properties in a project #218

Merged
merged 1 commit into from
Mar 30, 2016
Merged

Automate configuration of SCM export properties in a project #218

merged 1 commit into from
Mar 30, 2016

Conversation

dalisch
Copy link
Contributor

@dalisch dalisch commented Mar 30, 2016

Overview

  • similar to existing scm_import_properties, new hash parameter scm_export_properties added in rundeck::config::project when it is desired to pre-specify the SCM configuration for exporting Rundeck jobs
  • properties used to populate scm-export.properties via scm-export.properties.erb template

@@ -55,7 +55,8 @@
$node_executor_settings = {},
$projects_dir = undef,
$resource_sources = $rundeck::resource_sources,
$scm_import_properties = $rundeck::scm_import_properties,
$scm_import_properties = {},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do blank hashes/arrays in parameterized class variables still break hiera?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jyaworski - yes, they break in the current implementation. In the template, the hash is iterated over like this:

<%- @scm_export_properties.sort.each do |k,v| -%>
<%= k %> = <%= v %>
<%- end -%>

If the hash is empty (which it may be if the user does not have a need to configure the SCM for a certain project), provisioning would fail on a null hash if it was not defaulted to '{}' here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I mean is that hiera's automatic lookups are known to fail on blank array defaults. Do they fail with blank hash defaults?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Null hash values or hashes with keys that have null values work fine.

@jyaworski jyaworski merged commit 5083a17 into voxpupuli:master Mar 30, 2016
@dalisch dalisch deleted the scm_export branch March 30, 2016 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants