WebSdk: new 'OneDeploy' publish method #43690
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add new
OneDeployWebSdk publish method.This new publish method targets the 2 new Azure site endpoints APIs:
<azure_site_scm>/api/publish(as for Function App - Flex Consumption)<azure_site_scm>/api/[continuouswebjobs | triggeredwebjobs]/<WebJob_name>(as for WebJob (Linux) project)In this PR:
Define new
OneDeploypublish task:OneDeploytype to carry out the publish operation.IDeploymentStatusServicetype defining a service to poll the deployment operation status (if defined).OneDeployStatusServiceis the implementation forOneDeploy.ITaskLoggertype to abstract out the logging mechanism used in theTaskallowing us to also verify all the logging done during testing.TaskLoggeris the implementation that wraps theTaskLoggingHelperobject to do the logging..resxmessages for the new publish methodDefine new task
CreatePackageFileto produce a package (e.g., .zip, .tar, etc.) allowing it to be more flexible of what package to produce and provide custom implementation. For now, only the .zip file is supported.IFilePackagertype to define aTaskto produce a package and be able to abstract the functionality. NewZipFilePackageris the implementation that produces .zip files.Move all the HTTP utilities (and related classes) previously defined under
ZipDeployfolder, so it can be reused by newOneDeployimplementation and any other related classes.Add/modify new MSBUILD
.targetsfile for the new publish method/PublishTargets/Microsoft.NET.Sdk.Publish.OneDeploy.targets/PublishProfiles/DefaultOneDeploy.pubxmland/PublishProfiles/DefaultWebJobOneDeploy.pubxmlsamples/CopyTargets/Microsoft.NET.Sdk.Publish.CopyFiles.targetsand/TransformTargets/Microsoft.NET.Sdk.Publish.TransformFiles.targetsto change how theWebJobpackaging is done during publish forOneDeploy. This is, it will not add the project code inside../app_data/Jobs/<WebJobType>directory to produce the package, but it will package the content from the project root path.Add UTs for all new code/implementation.