2
votes

I am currently finishing up creating a CI dev pipeline and referencing the following documentations

The references all show that the artifacts get zipped up first, published, then deployed.

However, the project developer told me that after the .NET build, he just copies/deploys the generated AngularOutput artifacts to the Azure app service.

I tested it that way with archive task then publish, and the CI pipeline worked just fine. However, I also tested out publishing directly without prior archiving, and i changed the path to \Bundles\AngularOutput, and the publish step succeeded just fine and displayed the published artifacts

replaced artifacts published

So the question is, if publish works without zipping/archiving first, then can I directly deploy after the artifacts are published? and if so, what needs to be specified for the Azure App Service Deploy task: Package/Folder?

pipeline snapshot

If archiving task is necessary/recommended, thats fine, but does that means Azure App Service deploy will automatically extract the zipped up artifact?

1

1 Answers

2
votes

First of all, yes you can publish your artifact without actually publishing them on the pipeline as artifact. However, if you publish them on the pipeline and have build and release pipelines separate you can redeploy without rebuilding your app.

Also you can always download artifact and publish it manually if where is a need for that. (some development/debug purposes for instance).

And Zip deploy method

enter image description here

which is used here

Creates a .zip deployment package of the chosen Package or folder and deploys the file contents to the wwwroot folder of the App Service name function app in Azure. This option overwrites all existing contents in the wwwroot folder. For more information, see Zip deployment for Azure Functions.

so if you need to deploy it from the build pipeline you can just put path to your zip file or to folder file where the content is.

And please consider multi stage pipeline where you can separate build and deploy phases among stages. However, in this case you need to publish your artifact as a pipeline artifact. And this pipeline artifact will be downloaded automatically on deployment job.