module Deployment module Methods module IIS def iis_build Helper.validates_presence_of @cdb['iis_build_url'], \ 'iis_build_url parameter is missing' Helper.validates_presence_of @cdb['iis_build_protocol'], \ 'iis_build_protocol parameter is missing' Helper.validates_presence_of $recipe_config['TAG'], \ 'TAG parameter is missing' Helper.validates_presence_of $recipe_config['ENVIRONMENT'], \ 'ENV parameter is missing' Helper.validates_presence_of @version['app'], \ 'VERSION parameter is missing' Helper.validates_presence_of $recipe_config['VALUE'], \ 'VALUE parameter is missing' iis = ::Publisher::IIS.new iis.protocol = @cdb['iis_build_protocol'] iis.url = @cdb['iis_build_url'] if @cdb['http_read_timeout'] iis.http_read_timeout = @cdb['http_read_timeout'] else iis.http_read_timeout = 180 end iis.build($recipe_config['TAG'], $recipe_config['ENVIRONMENT'], @version['app'], $recipe_config['VALUE'], $recipe_config[:application_name]) end def iis_deploy(options = {}) Helper.validates_presence_of options[:iis_deploy_url] || @cdb['iis_deploy_url'], \ 'iis_deploy_url parameter is missing' Helper.validates_presence_of @cdb['iis_application_name'], \ 'iis_application_name parameter is missing' Helper.validates_presence_of @cdb['iis_deploy_protocol'], \ 'iis_deploy_protocol parameter is missing' Helper.validates_presence_of $recipe_config['ENVIRONMENT'], \ 'ENV parameter is missing' Helper.validates_presence_of @version['app'], \ 'VERSION parameter is missing' iis = ::Publisher::IIS.new iis.protocol = @cdb['iis_deploy_protocol'] iis.url = options[:iis_deploy_url] || @cdb['iis_deploy_url'] if @cdb['http_read_timeout'] iis.http_read_timeout = @cdb['http_read_timeout'] else iis.http_read_timeout = 180 end iis.deploy(@version['app'], @cdb['iis_application_name'], $recipe_config['ENVIRONMENT'].downcase) end def iis_appcmd Helper.validates_presence_of @cdb['iis_appcmd_url'], \ 'iis_appcmd_url parameter is missing' Helper.validates_presence_of $recipe_config['VALUE'], \ 'VALUE parameter is missing' iis = ::Publisher::IIS.new iis.protocol = @cdb['iis_appcmd_protocol'] iis.url = @cdb['iis_appcmd_url'] if @cdb['http_read_timeout'] iis.http_read_timeout = @cdb['http_read_timeout'] else iis.http_read_timeout = 180 end iis.appcmd($recipe_config['VALUE']) end end end end