libraries/plugin.rb
# current_resource is the currently installed jenkins plugin.
current_resource is the currently installed jenkins plugin.
current_resource is the currently installed jenkins plugin .
def load_current_resource
      Chef::Log.info("**** inspect: new_resource ****")
      Chef::Log.info(new_resource.inspect)
      Chef::Log.info("*******************************")
      @current_resource ||= Resource::JenkinsPlugin.new(new_resource.name)
      @current_resource.source(new_resource.source)
      @current_resource.version(new_resource.version)
      Chef::Log.info("load_current_resource: current_resource.name #{@current_resource.name}")
      Chef::Log.info("load_current_resource: current_resource.source #{@current_resource.source}")
      Chef::Log.info("load_current_resource: current_resource.version #{@current_resource.version}")
      if current_plugin
        Chef::Log.info("**** inspect: current_plugin ****")
        Chef::Log.info(current_plugin.inspect)
        Chef::Log.info("*********************************")
        @current_resource.installed = true
        @current_resource.version(current_plugin[:plugin_version])
      else
        @current_resource.installed = false
      end
      Chef::Log.info("**** inspect: current_resource ****")
      Chef::Log.info(@current_resource.inspect)
      Chef::Log.info("***********************************")
      @current_resource
    end
def load_current_resource Chef :: Log . info ( "**** inspect: new_resource ****" ) Chef :: Log . info ( new_resource . inspect ) Chef :: Log . info ( "*******************************" ) @current_resource ||= Resource :: JenkinsPlugin . new ( new_resource . name ) @current_resource . source ( new_resource . source ) @current_resource . version ( new_resource . version ) Chef :: Log . info ( "load_current_resource: current_resource.name #{@current_resource.name}" ) Chef :: Log . info ( "load_current_resource: current_resource.source #{@current_resource.source}" ) Chef :: Log . info ( "load_current_resource: current_resource.version #{@current_resource.version}" ) if current_plugin Chef :: Log . info ( "**** inspect: current_plugin ****" ) Chef :: Log . info ( current_plugin . inspect ) Chef :: Log . info ( "*********************************" ) @current_resource . installed = true @current_resource . version ( current_plugin [ :plugin_version ] ) else @current_resource . installed = false end Chef :: Log . info ( "**** inspect: current_resource ****" ) Chef :: Log . info ( @current_resource . inspect ) Chef :: Log . info ( "***********************************" ) @current_resource end
current_resource is the currently installed jenkins plugin.
current_resource is the currently installed jenkins plugin .