Edit

Share via


IISWebAppDeploymentOnMachineGroup@0 - IIS web app deploy v0 task

Use this task to deploy a website or web application using Web Deploy.

Important

This task only works with Classic pipelines. Use IIS Web App Deployment Using WinRM - Visual Studio Marketplace instead.

Syntax

# IIS web app deploy v0
# Deploy a website or web application using Web Deploy.
- task: IISWebAppDeploymentOnMachineGroup@0
  inputs:
    WebSiteName: # string. Required. Website Name. 
    #VirtualApplication: # string. Virtual Application. 
    Package: '$(System.DefaultWorkingDirectory)\**\*.zip' # string. Required. Package or Folder. Default: $(System.DefaultWorkingDirectory)\**\*.zip.
  # Advanced Deployment Options
    #SetParametersFile: # string. SetParameters File. 
    #RemoveAdditionalFilesFlag: false # boolean. Remove Additional Files at Destination. Default: false.
    #ExcludeFilesFromAppDataFlag: false # boolean. Exclude Files from the App_Data Folder. Default: false.
    #TakeAppOfflineFlag: false # boolean. Take App Offline. Default: false.
    #AdditionalArguments: # string. Additional Arguments. 
  # File Transforms & Variable Substitution Options
    #XmlTransformation: false # boolean. XML transformation. Default: false.
    #XmlVariableSubstitution: false # boolean. XML variable substitution. Default: false.
    #JSONFiles: # string. JSON variable substitution.

Inputs

WebSiteName - Website Name
string. Required.

Specifies the name of an existing website on the machine group machines.


VirtualApplication - Virtual Application
string.

Specifies the name of an existing Azure Virtual application on the target machines.


Package - Package or Folder
string. Required. Default: $(System.DefaultWorkingDirectory)\**\*.zip.

Specifies the file path to the package or folder generated by MSBuild or to a compressed archive file. Variables ( Build | Release) and wildcards are supported.


SetParametersFile - SetParameters File
string. Optional.

Specifies the path to the SetParameters.xml file to be used.


RemoveAdditionalFilesFlag - Remove Additional Files at Destination
boolean. Default: false.

If set to true, deletes files on the Web App that don’t have matching files in the Web App ZIP package.


ExcludeFilesFromAppDataFlag - Exclude Files from the App_Data Folder
boolean. Default: false.

If set to true, this prevents files in the App_Data folder from being deployed to the Web App.


TakeAppOfflineFlag - Take App Offline
boolean. Default: false.

Selects the option to take the Web App offline by placing an app_offline.htm file in its root directory before the sync operation begins. The file is automatically removed after the sync operation completes successfully.


AdditionalArguments - Additional Arguments
string.

Specifies additional Web Deploy arguments to use when deploying the Azure Web App. For example, -disableLink:AppPoolExtension or -disableLink:ContentExtension.

For a full list of supported arguments, see Web Deploy Operation Settings.


XmlTransformation - XML transformation
boolean. Default: false.

Runs XML transformations for *.Release.config and *.<EnvironmentName>.config files on the corresponding *.config file. These transformations are applied before variable substitution. XML transformations are supported only on Windows.


XmlVariableSubstitution - XML variable substitution
boolean. Default: false.

Specifies the variables defined in the build or release pipeline. These variables are matched against the key or name entries in the appSettings, applicationSettings, and connectionStrings sections of any config file and parameters.xml. Variable Substitution is performed after config transformations.

Note

If the same variables are defined in both the release pipeline and the environment, the environment variables will take precedence over the release pipeline variables.


JSONFiles - JSON variable substitution
string.

Specifies a newline-separated list of JSON files for variable substitution. File names must be relative to the root folder.

To substitute nested or hierarchical JSON variables, use JSONPath expressions. For example, to replace the value of ConnectionString in the sample below, define a variable as Data.DefaultConnection.ConnectionString in the build or release pipeline (or in the release pipeline's stage).

{  
  "Data": {  
    "DefaultConnection": {  
      "ConnectionString": "Server=(localdb)\SQLEXPRESS;Database=MyDB;Trusted_Connection=True"  
    }  
  }  
}

Variable substitution is run after configuration transforms, and pipeline variables are excluded from substitution.


Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

None.

Remarks

Use this task to deploy a website or web app using WebDeploy.

Examples

Requirements

Requirement Description
Pipeline types Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 2.104.1 or greater
Task category Deploy