Extract zip file on azure web app

%3CLINGO-SUB%20id%3D%22lingo-sub-1375369%22%20slang%3D%22en-US%22%3EExtract%20zip%20file%20on%20azure%20web%20app%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1375369%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20using%20below%20YAML%20script%20to%20deploy%20my%20artifact%20on%20azure%20web%20app%2C%20it%20works%20fine%20but%20it%20doesn't%20unzip%20the%20file%20on%20azure%20web%20app%2C%20it%20just%20deploy%20zip%20file%20and%20my%20web%20app%20doesn't%20run%20coz%20of%20zip%20file%3C%2FP%3E%3CP%3EI%20search%20entire%20world%20but%20not%20able%20to%20get%20any%20%2Bve%20answer%2C%20now%20i%20am%20requesting%20you%20to%20please%20help%20me.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-%20stage%3A%20Deploy%3CBR%20%2F%3EdisplayName%3A%20Deploy%20stage%3CBR%20%2F%3EdependsOn%3A%20Build%3CBR%20%2F%3Econdition%3A%20succeeded()%3CBR%20%2F%3E%3CBR%20%2F%3Ejobs%3A%3CBR%20%2F%3E-%20deployment%3A%20Deploy%3CBR%20%2F%3EdisplayName%3A%20Deploy%3CBR%20%2F%3Eenvironment%3A%20'development'%3CBR%20%2F%3Epool%3A%3CBR%20%2F%3EvmImage%3A%20%24(vmRunTimeImageName)%3CBR%20%2F%3E%3CBR%20%2F%3Estrategy%3A%3CBR%20%2F%3ErunOnce%3A%3CBR%20%2F%3Edeploy%3A%3CBR%20%2F%3Esteps%3A%3CBR%20%2F%3E-%20task%3A%20AzureWebApp%401%3CBR%20%2F%3Einputs%3A%3CBR%20%2F%3EazureSubscription%3A%20'%24(azureSubscription)'%3CBR%20%2F%3EappType%3A%20'webAppLinux'%3CBR%20%2F%3EappName%3A%20'%24(webAppName)'%3CBR%20%2F%3Epackage%3A%20'%24(Pipeline.Workspace)%2Fartifact%2F%24(artifactFile)'%3CBR%20%2F%3EdeploymentMethod%3A%20'auto'%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1375369%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Web%20App%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1375537%22%20slang%3D%22en-US%22%3ERe%3A%20Extract%20zip%20file%20on%20azure%20web%20app%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1375537%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F661360%22%20target%3D%22_blank%22%3E%40anujsharrma%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20Are%20you%20fine%3F%3C%2FP%3E%3CP%3EI%20hope%20So!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20%3CA%20href%3D%22mailto%3AAzureWebApp%401%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EAzureWebApp%401%3C%2FA%3E%20the%20%22%20FILE%20%22%20is%20on%20the%3A%3C%2FP%3E%3CPRE%3E%3CSPAN%3E%3CSPAN%20class%3D%22hljs-string%22%3E%24(System.DefaultWorkingDirectory)%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3EAccordingly%20to%20the%20documentation%20the%20snippet%20looks%20for%20the%20.zip%20file%20on%20the%20path%20above.%3C%2FP%3E%3CP%3ECould%20you%20try%20doing%20like%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-%20task%3A%20AzureWebApp%401%3CBR%20%2F%3Einputs%3A%3CBR%20%2F%3EazureSubscription%3A%20'%3CAZURE%20service%3D%22%22%20connection%3D%22%22%3E'%3CBR%20%2F%3EappName%3A%20'%3CNAME%20of%3D%22%22%20web%3D%22%22%20app%3D%22%22%3E'%3CBR%20%2F%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23FF0000%22%3Epackage%3A%20%24(System.DefaultWorkingDirectory)%2F**%2F*.zip%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FNAME%3E%3C%2FAZURE%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDocumentation%20Link%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevops%2Fpipelines%2Ftargets%2Fwebapp%3Fview%3Dazure-devops%26amp%3Btabs%3Dyaml%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevops%2Fpipelines%2Ftargets%2Fwebapp%3Fview%3Dazure-devops%26amp%3Btabs%3Dyaml%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELet%20me%20know%20if%20I%20could%20help%20you%20with%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Fhtml%2Fimages%2Femoticons%2Fhappyface_40x40.gif%22%20alt%3D%22%3Ahappyface%3A%22%20title%3D%22%3Ahappyface%3A%22%20%2F%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1377966%22%20slang%3D%22en-US%22%3ERe%3A%20Extract%20zip%20file%20on%20azure%20web%20app%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1377966%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F253908%22%20target%3D%22_blank%22%3E%40RodNet%3C%2FA%3E%26nbsp%3B%20Thanks%20for%20your%20response%20but%20unfortunately%20i%20tried%20this%20approach%20but%20it%20doesn't%20work.%20i%20got%20an%20error%20that%20%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3Eno%20package%20found%20with%20specified%20pattern%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSTRONG%3E%3A(%3C%2Fimg%3E%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1378004%22%20slang%3D%22en-US%22%3ERe%3A%20Extract%20zip%20file%20on%20azure%20web%20app%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1378004%22%20slang%3D%22en-US%22%3EHum....%3CBR%20%2F%3EI%20think%20that%20you%20need%20to%20review%20the%20build%20pipeline.%3CBR%20%2F%3EHave%20you%20published%20your%20artifacts%20package%20%3F%3CBR%20%2F%3EIf%20not%20try%20to%20add%20this%20line%20in%20the%20final%20of%20you%20.yml%20build%20pipeline.%3CBR%20%2F%3E%3CBR%20%2F%3Etask%3A%20PublishBuildArtifacts%401%22%3CBR%20%2F%3E%3CBR%20%2F%3EFollow%20this%20link%20will%20help.%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdevelopercommunity.visualstudio.com%2Fcontent%2Fproblem%2F349729%2Ferror-no-package-found-with-specified-pattern-dar1.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdevelopercommunity.visualstudio.com%2Fcontent%2Fproblem%2F349729%2Ferror-no-package-found-with-specified-pattern-dar1.html%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EHope%20it%20can%20helps%3C%2FLINGO-BODY%3E
New 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