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
OneDeploy
WebSdk 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
OneDeploy
publish task:OneDeploy
type to carry out the publish operation.IDeploymentStatusService
type defining a service to poll the deployment operation status (if defined).OneDeployStatusService
is the implementation forOneDeploy
.ITaskLogger
type to abstract out the logging mechanism used in theTask
allowing us to also verify all the logging done during testing.TaskLogger
is the implementation that wraps theTaskLoggingHelper
object to do the logging..resx
messages for the new publish methodDefine new task
CreatePackageFile
to 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.IFilePackager
type to define aTask
to produce a package and be able to abstract the functionality. NewZipFilePackager
is the implementation that produces .zip files.Move all the HTTP utilities (and related classes) previously defined under
ZipDeploy
folder, so it can be reused by newOneDeploy
implementation and any other related classes.Add/modify new MSBUILD
.targets
file for the new publish method/PublishTargets/Microsoft.NET.Sdk.Publish.OneDeploy.targets
/PublishProfiles/DefaultOneDeploy.pubxml
and/PublishProfiles/DefaultWebJobOneDeploy.pubxml
samples/CopyTargets/Microsoft.NET.Sdk.Publish.CopyFiles.targets
and/TransformTargets/Microsoft.NET.Sdk.Publish.TransformFiles.targets
to change how theWebJob
packaging 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.