Skip to content

Update publish-AzWebApp to support pull based deployments. #27228

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

Merged
merged 8 commits into from
Mar 24, 2025

Conversation

dannysongg
Copy link
Member

Description

Add support for pull based deployments from a URL with MSI authentication in Publish-AzWebApp. This change adds 2 parameters to enable this feature: ArchiveURL and -PullIdentity.

Notable Changes:

  • Add ArchiveURL parameter
  • Add PullIdentity parameter
  • ArchivePath is no longer a required parameter. ArchivePath OR ArchiveURL must be provided. If both are provided, ArchivePath will be ignored

-PullIdentity Usage:

  • null: MSI will not be used. This matches the existing behavior (SAS or public access)
  • system: Authenticates using system assigned identity
  • {client-Id}: Authenticates using provided user assigned identity

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • For SDK-based development mode, update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • For autorest-based development mode, include the changelog in the PR description.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Sorry, something went wrong.

Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@dannysongg dannysongg requested a review from msJinLei February 26, 2025 01:48
@notyashhh notyashhh requested review from notyashhh and Copilot and removed request for msJinLei March 3, 2025 11:31
@notyashhh
Copy link
Member

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR adds support for pull based deployments from a URL with MSI authentication in Publish-AzWebApp by introducing two new parameters: ArchiveURL and PullIdentity.

  • ArchivePath is now optional and ArchiveURL is introduced as an alternative artifact source.
  • The cmdlet now validates that when deploying from a URL, the deployment type is provided and restricts pull-based MSI deployments to Windows WebApps.
  • Updates include changes to the cmdlet implementation, help file adjustments, test additions, and a changelog entry.

Reviewed Changes

File Description
src/Websites/Websites/Cmdlets/WebApps/PublishAzureWebApp.cs Updated parameters and deployment logic to support pull based deployments with MSI authentication.
src/Websites/Websites.Test/ScenarioTests/WebAppTests.cs Added a test case for pull based deployments with MSI.
src/Websites/Websites/help/Publish-AzWebApp.md Revised help documentation to reflect new parameters and usage.
src/Websites/Websites/ChangeLog.md Added a changelog entry for the new MSI-based pull deployment feature.

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/Websites/Websites/Cmdlets/WebApps/PublishAzureWebApp.cs:103

  • [nitpick] The variable name 'fileExtention' appears to be misspelled; consider renaming it to 'fileExtension' for clarity.
string fileExtention = Path.GetExtension(ArchivePath);

@notyashhh
Copy link
Member

Hi @dannysongg, The way Azure pipelines run test cases is in the Playback mode. So you need to run the tests locally in 'Record' Mode. After which there will be a new file generated in SessionRecords folder that will contain the session recordings. Follow these steps: Azure Powershell Testing Docs.

Copy link

github-actions bot commented Mar 3, 2025

This PR was labeled "needs-revision" because it has unresolved review comments or CI failures.
Please resolve all open review comments and make sure all CI checks are green. Refer to our guide to troubleshoot common CI failures.

@dannysongg
Copy link
Member Author

@notyashhh session recordings have been added

@notyashhh
Copy link
Member

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@notyashhh
Copy link
Member

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@notyashhh notyashhh self-assigned this Mar 24, 2025
@notyashhh notyashhh added this to the Az 13.4.0 (04/01/2025) milestone Mar 24, 2025
@notyashhh notyashhh merged commit fd27dc1 into Azure:main Mar 24, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants