Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSdk: new 'OneDeploy' publish method #43690

Merged

Conversation

anvillan
Copy link
Member

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:

    • Define new OneDeploy type to carry out the publish operation.
    • Define new IDeploymentStatusService type defining a service to poll the deployment operation status (if defined). OneDeployStatusService is the implementation for OneDeploy.
    • Define new ITaskLogger type to abstract out the logging mechanism used in the Task allowing us to also verify all the logging done during testing. TaskLogger is the implementation that wraps the TaskLoggingHelper object to do the logging.
    • Add new .resx messages for the new publish method
  • Define 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.

    • Define new IFilePackager type to define a Task to produce a package and be able to abstract the functionality. New ZipFilePackager 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 new OneDeploy implementation and any other related classes.

  • Add/modify new MSBUILD .targets file for the new publish method

    • New /PublishTargets/Microsoft.NET.Sdk.Publish.OneDeploy.targets
    • New /PublishProfiles/DefaultOneDeploy.pubxml and /PublishProfiles/DefaultWebJobOneDeploy.pubxml samples
    • Modify /CopyTargets/Microsoft.NET.Sdk.Publish.CopyFiles.targets and /TransformTargets/Microsoft.NET.Sdk.Publish.TransformFiles.targets to change how the WebJob packaging is done during publish for OneDeploy. 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.

@anvillan anvillan requested a review from vijayrkn as a code owner September 25, 2024 17:53
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-WebSDK untriaged Request triage from a team member labels Sep 25, 2024
…seMessageWrapper' against NRE and update UTs
@anvillan anvillan merged commit 6f2f624 into dotnet:main Oct 1, 2024
37 checks passed
@anvillan
Copy link
Member Author

anvillan commented Oct 9, 2024

/backport to release/9.0.1xx

Copy link
Contributor

github-actions bot commented Oct 9, 2024

Started backporting to release/9.0.1xx: https://github.com/dotnet/sdk/actions/runs/11261909756

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-WebSDK untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants