Skip to content

Commit

Permalink
Added multiple binding support in IIS Manage (#3952)
Browse files Browse the repository at this point in the history
* Added multiple binding support in IIS Manage and updated major version

* Updated the task to handle both current and previous inputs

* Addressed review comments and minor fixes

* bug fixes
  • Loading branch information
asranja authored May 5, 2017
1 parent 03fabf1 commit 662b871
Show file tree
Hide file tree
Showing 20 changed files with 182 additions and 1,148 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ $websitePhysicalPath = Get-VstsInput -Name "WebsitePhysicalPath"
$websitePhysicalPathAuth = Get-VstsInput -Name "WebsitePhysicalPathAuth"
$websiteAuthUserName = Get-VstsInput -Name "WebsiteAuthUserName"
$websiteAuthUserPassword = Get-VstsInput -Name "WebsiteAuthUserPassword"

$addBinding = Get-VstsInput -Name "AddBinding"
$protocol = Get-VstsInput -Name "Protocol"
$ipAddress = Get-VstsInput -Name "IPAddress"
Expand All @@ -25,6 +26,7 @@ $hostNameWithOutSNI = Get-VstsInput -Name "HostNameWithOutSNI"
$hostNameWithHttp = Get-VstsInput -Name "HostNameWithHttp"
$hostNameWithSNI = Get-VstsInput -Name "HostNameWithSNI"
$sslCertThumbPrint = Get-VstsInput -Name "SSLCertThumbPrint"
$bindings = Get-VstsInput -Name "Bindings"

$createOrUpdateAppPoolForWebsite = Get-VstsInput -Name "CreateOrUpdateAppPoolForWebsite"
$appPoolNameForWebsite = Get-VstsInput -Name "AppPoolNameForWebsite"
Expand Down Expand Up @@ -85,7 +87,7 @@ try {
"IISWebsite"
{
Set-IISWebsite -actionIISWebsite $actionIISWebsite -websiteName $websiteName -startStopWebsiteName $startStopWebsiteName -physicalPath $websitePhysicalPath -physicalPathAuth $websitePhysicalPathAuth -physicalPathAuthUserName $websiteAuthUserName -physicalPathAuthUserPassword $websiteAuthUserPassword `
-addBinding $addBinding -protocol $protocol -ipAddress $ipAddress -port $port -serverNameIndication $serverNameIndication `
-addBinding $addBinding -bindings $bindings -protocol $protocol -ipAddress $ipAddress -port $port -serverNameIndication $serverNameIndication `
-hostNameWithOutSNI $hostNameWithOutSNI -hostNameWithHttp $hostNameWithHttp -hostNameWithSNI $hostNameWithSNI -sslCertThumbPrint $sslCertThumbPrint `
-createOrUpdateAppPool $createOrUpdateAppPoolForWebsite -appPoolName $appPoolNameForWebsite -dotNetVersion $dotNetVersionForWebsite -pipeLineMode $pipeLineModeForWebsite -appPoolIdentity $appPoolIdentityForWebsite -appPoolUsername $appPoolUsernameForWebsite -appPoolPassword $appPoolPasswordForWebsite `
-configureAuthentication $configureAuthenticationForWebsite -anonymousAuthentication $anonymousAuthenticationForWebsite -basicAuthentication $basicAuthenticationForWebsite -windowsAuthentication $windowsAuthenticationForWebsite -appCmdCommands $appCmdCommands
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"loc.description": "Create or update a Website, Web App, Virtual Directories, and Application Pool",
"loc.instanceNameFormat": "Manage $(IISDeploymentType)",
"loc.group.displayName.Website": "IIS Website",
"loc.group.displayName.IISBindings": "IIS Bindings",
"loc.group.displayName.ApplicationPoolForWebsite": "IIS Application pool",
"loc.group.displayName.IISWebsiteAuthentication": "IIS Authentication",
"loc.group.displayName.ApplicationPool": "IIS Application pool",
Expand Down Expand Up @@ -47,6 +48,8 @@
"loc.input.help.HostNameWithSNI": "Enter a host name (or domain name) for the website. <br>If a host name is specified, then the clients must use the host name instead of the IP address to access the website.<br>",
"loc.input.label.SSLCertThumbPrint": "SSL certificate thumbprint",
"loc.input.help.SSLCertThumbPrint": "Provide the thumb-print of the Secure Socket Layer certificate that the website is going to use for the HTTPS communication as a 40 character long hexadecimal string. The SSL certificate should be already installed on the Computer, at Local Computer, Personal store.",
"loc.input.label.Bindings": "Add bindings",
"loc.input.help.Bindings": "Click on the extension [...] button to add bindings for the website.",
"loc.input.label.CreateOrUpdateAppPoolForWebsite": "Create or update app pool",
"loc.input.help.CreateOrUpdateAppPoolForWebsite": "Select the option to create or update an application pool. If checked, the website will be created in the specified app pool.",
"loc.input.label.ConfigureAuthenticationForWebsite": "Configure authentication",
Expand Down Expand Up @@ -123,11 +126,12 @@
"loc.input.help.StartStopRecycleAppPoolName": "Provide the name of the IIS application pool.",
"loc.input.label.AppCmdCommands": "Additional appcmd.exe commands",
"loc.input.help.AppCmdCommands": "Enter additional AppCmd.exe commands. For more than one command use a line separator, like <br/> list apppools <br/> list sites<br/> recycle apppool /apppool.name:ExampleAppPoolName",
"loc.messages.InvalidSslThumbprint": "Invalid thumbprint. Length is not 40 characters or contains invalid characters.",
"loc.messages.InvalidVirtualPath": "Virtual path should begin with a /",
"loc.messages.InvalidIISDeploymentType": "Invalid IIS Deployment Type : {0}",
"loc.messages.InvalidActionIISWebsite": "Invalid action '{0}' selected for the IIS Website.",
"loc.messages.InvalidActionIISAppPool": "Invalid action '{0}' selected for the IIS Application Pool.",
"loc.messages.PackageDeploymentFailed": "Failed to deploy web package to IIS website.",
"loc.messages.SSLCertWarningInvalidCharacters": "SSL Certificate thumbprint contains non-hexadecimal characters. Trimming all non-hexadecimal characters."
"loc.messages.SSLCertificateThumbprintMissingInHttpsBinding": "SSL Certificate thumbprint missing in the https binding : ( {0}/{1}:{2} )",
"loc.messages.InvalidSslThumbprintInBinding": "Invalid thumbprint in binding ( {0}/{1}:{2} ). Length is not 40 characters or contains invalid characters.",
"loc.messages.SSLCertWarningInvalidCharactersInBinding": "SSL Certificate thumbprint contains non-hexadecimal characters in binding : ( {0}/{1}:{2} ) . Trimming all non-hexadecimal characters."
}
49 changes: 0 additions & 49 deletions Tasks/IISWebAppManagementOnMachineGroup/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,55 +27,6 @@ describe('IISWebAppManagementOnMachineGroup Suite', function () {
});

if (ps) {

it('test website exists', (done) => {
psr.run(path.join(__dirname, 'L0AppcmdTestWebsiteExists.ps1'), done);
})

it('test add and update website', (done) => {
psr.run(path.join(__dirname, 'L0AppcmdAddUpdateWebsite.ps1'), done);
})

it('test add binding for website', (done) => {
psr.run(path.join(__dirname, 'L0AppcmdTestBinding.ps1'), done);
})

it('test sni and sslcert addition for https binding', (done) => {
psr.run(path.join(__dirname, 'L0AppcmdTestSSLandSNI.ps1'), done);
})

it('test application pool exists', (done) => {
psr.run(path.join(__dirname, 'L0AppcmdTestApplicationPoolExists.ps1'), done);
})

it('test add and update appPool', (done) => {
psr.run(path.join(__dirname, 'L0AppcmdAddUpdateAppPool.ps1'), done);
})

it('test application exists', (done) => {
psr.run(path.join(__dirname, 'L0AppcmdTestApplicationExists.ps1'), done);
})

it('test add and update application', (done) => {
psr.run(path.join(__dirname, 'L0AppcmdAddUpdateApplication.ps1'), done);
})

it('test virtual directory exists', (done) => {
psr.run(path.join(__dirname, 'L0AppcmdTestVirtualDirExists.ps1'), done);
})

it('test add and update virtual directory', (done) => {
psr.run(path.join(__dirname, 'L0AppcmdAddUpdateVDir.ps1'), done);
})

it('test additional actions for website and application pool', (done) => {
psr.run(path.join(__dirname, 'L0AppcmdAdditionalActions.ps1'), done);
})

it('test execute main for appcmd', (done) => {
psr.run(path.join(__dirname, 'L0AppcmdExecuteMain.ps1'), done);
})

it('test iis manage utility - manage website', (done) => {
psr.run(path.join(__dirname, 'L0UtilityManageWebsite.ps1'), done);
})
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 662b871

Please sign in to comment.