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

Why does plugin.pp take a parent plugin parameter? #89

Closed
nibalizer opened this issue Jan 24, 2014 · 6 comments
Closed

Why does plugin.pp take a parent plugin parameter? #89

nibalizer opened this issue Jan 24, 2014 · 6 comments

Comments

@nibalizer
Copy link
Member

It seems redundant to specify the parent directory of the plugin. On unix we could call dirname to find this string. In puppet we could do:

$plugin_dir = '/var/lib/jenkins/plugins'
$plugin_dir_parent = inline_template("<%= @plugin_dir.split('/')[0..-2].join("/") %>")

A bit gross, but better than duplicating. I'm somewhat suprised that a 'dirname' function doesn't exist in stdlib.

@rtyler rtyler added this to the 1.1.0 Duckworth milestone Feb 24, 2014
@jlambert121
Copy link
Contributor

dirname does exist in stdlib, but not in the 3.x series (only in 4.x). Currently PE only supports the 3.x series so we can't reliably use the dirname function. Your solution would work for this - would you be able to send a PR?

@matthewbarr
Copy link
Contributor

Looks like 4.x is supported by PE, but they might need to manually update. 4.x is still compatable with Puppet 2.7, despite original plans..

might be worth considering, sooner or later..

@jlambert121
Copy link
Contributor

Awesome - what versions of PE support 4?

Maybe we put this in as a post 1.0? Make the next version require stdlib >= 4.0?

@matthewbarr
Copy link
Contributor

v3.0.x (Released in PE 3)
v4.0.x (Maintains compatibility with v3.x despite the major semantic version bump. Compatible with Puppet 2.7.x)
(from https://github.com/puppetlabs/puppetlabs-stdlib )

However, it doesn't ship with PE 3, so.. yeh.

I don't have PE, but i don't know if it breaks if you update PE's stdlib to a newer verison than it ships with.

@jlambert121
Copy link
Contributor

A couple guys said you can't upgrade it (PL and former) with PE because of how tightly it's coupled, that's why I was curious what version. My thinking was the same as yours - puppet is supported, go for it.

That being said, I think for this either the inline_template or leave it as it is solutions are the most portable. I can do this later if the OP doesn't have time.

@rtyler
Copy link

rtyler commented Apr 1, 2014

I'm pretty sure this can be closed with the merge of #102

@rtyler rtyler closed this as completed Apr 1, 2014
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 a pull request may close this issue.

4 participants