Extract zip file on azure web app

Copper Contributor

I am using below YAML script to deploy my artifact on azure web app, it works fine but it doesn't unzip the file on azure web app, it just deploy zip file and my web app doesn't run coz of zip file

I search entire world but not able to get any +ve answer, now i am requesting you to please help me.

 

- stage: Deploy
displayName: Deploy stage
dependsOn: Build
condition: succeeded()

jobs:
- deployment: Deploy
displayName: Deploy
environment: 'development'
pool:
vmImage: $(vmRunTimeImageName)

strategy:
runOnce:
deploy:
steps:
- task: AzureWebApp@1
inputs:
azureSubscription: '$(azureSubscription)'
appType: 'webAppLinux'
appName: '$(webAppName)'
package: '$(Pipeline.Workspace)/artifact/$(artifactFile)'
deploymentMethod: 'auto'

3 Replies

@anujsharrma 

 

How Are you fine?

I hope So!

 

In the AzureWebApp@1 the " FILE " is on the:

$(System.DefaultWorkingDirectory)

Accordingly to the documentation the snippet looks for the .zip file on the path above.

Could you try doing like this:

 

- task: AzureWebApp@1
inputs:
azureSubscription: '<Azure service connection>'
appName: '<Name of web app>'
package: $(System.DefaultWorkingDirectory)/**/*.zip

 

Documentation Link: https://docs.microsoft.com/en-us/azure/devops/pipelines/targets/webapp?view=azure-devops&tabs=yaml

 

Let me know if I could help you with this.

 

:happyface:

 

 

@RodNet  Thanks for your response but unfortunately i tried this approach but it doesn't work. i got an error that no package found with specified pattern

:(

Hum....
I think that you need to review the build pipeline.
Have you published your artifacts package ?
If not try to add this line in the final of you .yml build pipeline.

task: PublishBuildArtifacts@1"

Follow this link will help.
https://developercommunity.visualstudio.com/content/problem/349729/error-no-package-found-with-speci...


Hope it can helps