0
votes

I'm trying to set up a release pipeline in Azure DevOps Server 2020. I need to deploy my application files, which are contained in a zip file to a specific subfolder on a remote server. I'm having a hard time trying to figure out how to make sure my application files are extracted into the right folder. There isn't an option for this in the Web App Deploy task.

Here is my Web Deploy Task in YAML:

- task: IISWebAppDeploymentOnMachineGroup@0
  displayName: 'Deploy to Dev'
  inputs:
    WebSiteName: 'DevServer'
    Package: '$(System.DefaultWorkingDirectory)/_ProdBuild/finalbuild.zip'
    TakeAppOfflineFlag: True
    XmlVariableSubstitution: True

I also looked on the page where I set up the Deployment Group and there's no setting for deploying to a subfolder.

This is my first time setting up a release pipeline in Azure DevOps. Any help would be appreciated.

1

1 Answers

0
votes

To set the deployment path in Pipeline, you need to add the IIS web app manage task(IISWebAppManagementOnMachineGroup@0) before the IISWebAppDeploymentOnMachineGroup task .

You could define the task input: WebsitePhysicalPath: 'localsubfolderpath'

Here is an example:

- task: IISWebAppManagementOnMachineGroup@0
  displayName: 'IIS Web App Manage'
  inputs:
    WebsiteName: test
    WebsitePhysicalPath: 'C:\inetpub\wwwroot1'
    AddBinding: True
    Bindings: '{"bindings":[{"protocol":"http","ipAddress":"All Unassigned","port":"88","hostname":"","sslThumbprint":"","sniFlag":false}]}'
    CreateOrUpdateAppPoolForWebsite: true
    AppPoolNameForWebsite: test
    ParentWebsiteNameForVD: test
    ParentWebsiteNameForApplication: test

Please refer to this doc about IIS Web App Manage task