I started using the strategy runonce yaml schema so i can add environment tag to my relase and add approval steps. https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema
BUT doing so AzureRmWebAppDeployment@4 step deploy whol file in the format below
/site/wwwroot/mywebApi/Content/D_C/a/1/s/src/mywebApi/obj/Release/Package/PackageTmp/
instead of unziping the package to /site/wwwroot/mywebApi/
this used to work when i did not use strategy
this used to work
jobs:
- job: Deploy
variables:
vmImage: 'windows-latest'
pool:
vmImage: $(vmImage)
displayName: 'Deploy ${{ parameters.project }} ${{ parameters.envName }}'
continueOnError: "false"
steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: '${{ parameters.project }}${{ parameters.envName }}'
downloadPath: '$(build.artifactStagingDirectory)'
- task: AzureRmWebAppDeployment@4
inputs:
ConnectionType: 'AzureRM'
azureSubscription: '****Azure'
appType: 'webApp'
WebAppName: '${{ parameters.webAppName }}'
deployToSlotOrASE: true
ResourceGroupName: '****'
SlotName: '${{ parameters.slotName }}'
VirtualApplication: '${{ parameters.virtualApplication }}'
packageForLinux: '$(build.artifactStagingDirectory)/**/*.zip'
this does not work but this is what i want for tagging release with environment
jobs:
# track deployments on the environment
- deployment: DeployWeb
displayName: deploy paystub Web App
environment: ${{ parameters.envName }}
variables:
vmImage: 'windows-latest'
pool:
vmImage: $(vmImage)
continueOnError: "false"
strategy:
runOnce:
deploy:
steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: '${{ parameters.project }}${{ parameters.envName }}'
downloadPath: '$(build.artifactStagingDirectory)'
- task: AzureRmWebAppDeployment@4
inputs:
ConnectionType: 'AzureRM'
azureSubscription: '***Azure'
appType: 'webApp'
WebAppName: '${{ parameters.webAppName }}'
deployToSlotOrASE: true
ResourceGroupName: '*****'
SlotName: '${{ parameters.slotName }}'
VirtualApplication: '${{ parameters.virtualApplication }}'
packageForLinux: '$(build.artifactStagingDirectory)/**/*.zip'
I would expect the new step to also deploy the code in this folder package to /site/wwwroot/mywebApi/
instead of doing some kudu copy to
/site/wwwroot/mywebApi/Content/D_C/a/1/s/src/mywebApi/obj/Release/Package/PackageTmp/