We're trying to deploy a prebuilt bot artefact into tenants via ARM deployments kicked off with REST APIs. We're struggling to replicate the actions of a gui based deployment from vs code / visual studio given that all the docs use the az cli. A manual deploy ends up with an app that includes dlls at the top level whereas our current route doesn't include the built dlls.
Our pipeline for producing our bot artifact is:
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: AzureCLI@2
inputs:
azureSubscription: 'GoSmarter Azure Service Connection'
scriptType: 'ps'
scriptLocation: 'scriptPath'
scriptPath: 'az-Prepare.ps1'
Where az-Prepare.ps1 includes az bot prepare-deploy --lang Csharp --code-dir $codeDirectory --proj-file-path $projectFileName
to produce the zip of the bot app so that we can put it into blob storage for use in the ARM template.
We then use an MSDeploy ARM resource to deploy this zip file as part of a bigger provisioning step.
{
"name": "MSDeploy",
"type": "extensions",
"location": "[variables('resourcesLocation')]",
"apiVersion": "2015-08-01",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('webAppName'))]"
],
"tags": {
"displayName": "deployArchive"
},
"properties": {
"packageUri": "[concat(variables('source'),'qnabotarchive.zip',parameters('SasToken'))]",
"dbType": "None",
"connectionString": ""
}
}
We tried setting the Kudu App Setting for triggering builds to true but this doesn't seem to apply to MSDeploy provided zips so doesn't do a promotion of the dlls.
{
"name": "SCM_DO_BUILD_DURING_DEPLOYMENT",
"value": "true"
}
Does anyone know what the right way is to configure the build, the app and/or the ARM template for the bot deployment to provide the dlls at the top level?
bot.dll
file when it is compiled and released? – Jason Panaz bot prepare-deploy
command doesn't make a fully deployable zip via msdeploy in arm. Theaz webapp deployment source
command in the docs uses kudu which does it's own build and puts the dlls in the top level dir – Steph Locke