Hi all,

We are configuring Jenkins and Sonar with puppet and both systems use
plugins. What is the preferred way of managing plugin-like resources
with puppet?

I am looking at two options but if you have a better idea let me know!

1. Create plugin::installed and plugin::uninstalled definitions:

    define plugin::installed {
      $plugin_url = "${name}"

      exec {
        "download-jenkins-plugin-${name}" :
          command   => "wget -O `basename ${plugin_url}` ${plugin_url} 
--no-check-certificate",
          cwd       => "${jenkins::plugin_dir}",
          path      => '/usr/bin',
          user      => "${jenkins::user}",
          group     => "${jenkins::group}",
          creates   => "${jenkins::plugin_dir}/${plugin}"
      }
    }

    define plugin::uninstalled {
      $plugin_url = "${name}"

      exec {
        "uninstall-jenkins-plugin ${name}" :
            command => "rm ${plugin_url}",
            cwd     => "${jenkins::plugin_dir}",
            path    => ['/usr/bin', '/bin'],
            user    => "${jenkins::user}",
            onlyif  => "test -e `basename ${plugin_url}`"
      }
    }

and define an array of installed and uninstalled plugins on which the
definitions are applied.

OR

2. On every puppet run, clear the plugin directory and then download
every plugin via a plugin definition and an array of installed
plugins.

Option 2 is more compact and easier to use but the downside is that
plugins are downloaded every time.

What do you think?

Cheers,

Frank

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/7BEGHYCw9ugJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to