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

Install a plugin should not prevent jenkins home to be a symlink #148

Closed
turb opened this issue Jun 19, 2014 · 0 comments
Closed

Install a plugin should not prevent jenkins home to be a symlink #148

turb opened this issue Jun 19, 2014 · 0 comments

Comments

@turb
Copy link

turb commented Jun 19, 2014

In manifests/plugin.pp:

if (!defined(File[$plugin_dir])) {
    file { [$plugin_parent_dir, $plugin_dir]:
      ensure => directory,
      owner => 'jenkins',
      group => 'jenkins',
      mode => '0755',
      require => [Group['jenkins'], User['jenkins']],
    }
  }

This forces the $plugin_parent_dir to be a directory. In our case, we have defined it to be a symbolic link, now erased. And all jenkins rules now start against a new empty dir.

I don't understand why the plugin class should do that: Jenkins installation and Jenkins user are requirements for this class.

dbeckham added a commit to dealnews/puppet-jenkins that referenced this issue Jul 30, 2014
The management of the basic dependencies of a Jenkins plugin should not
be unnecessarily forced on the user.

This change adds a new boolean parameter, `$manage_dependencies`, to
allow the user to specify whether or not jenkins::plugin will create
these dependencies. The default is true to support backwards
compatibility.

When set to false, the `/var/lib/jenkins` directory, the jenkins user
and the jenkins group are expected to be defined elsewhere or already
exist.

In addition, the plugin_parent_dir resource is checked for a previously
defined resource before being created in the same way that the
plugin_dir, user and group are checked.

Specific tests were created for the new parameter and they verify that
plugin_dir is created whether `$manage_dependencies` is true or false.

This fixes voxpupuli#148 in a more backwards compatible way than voxpupuli#149.
dbeckham added a commit to dealnews/puppet-jenkins that referenced this issue Jul 31, 2014
The management of the basic dependencies of a Jenkins plugin should not
be unnecessarily forced on the user. This change wraps the plugin_parent_dir
resource creation in a `defined` function to allow the user to create the
Jenkins home directory themselves if necessary.

This fixes voxpupuli#148 in a more backwards compatible way than voxpupuli#149.
@rtyler rtyler closed this as completed in f555e88 Sep 24, 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.

1 participant