Skip to content

Commit

Permalink
Fixed Publish-AzWebApp to use latest publish API when deploying war…
Browse files Browse the repository at this point in the history
… package [##19791] (#19917)

* Fixed `Publish-AzWebApp` to use latest publish API when deploying war package [##19791]

* Revert "Fixed `Publish-AzWebApp` to use latest publish API when deploying war package [##19791]"

This reverts commit e405d9b.

* Fixed `Publish-AzWebApp` to use latest publish API when deploying war package [##19791]

* Update ChangeLog.md

Co-authored-by: Xuejun Li <[email protected]>
Co-authored-by: Yabo Hu <[email protected]>
  • Loading branch information
3 people authored Oct 24, 2022
1 parent 44eb2c6 commit f3cdf6f
Show file tree
Hide file tree
Showing 4 changed files with 578 additions and 341 deletions.
9 changes: 9 additions & 0 deletions src/Websites/Websites.Test/ScenarioTests/WebAppTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1506,6 +1506,15 @@ function Test-PublishAzureWebAppFromWar
# Create new web app
$webapp = New-AzureRmWebApp -ResourceGroupName $rgname -Name $appName -Location $location -AppServicePlan $planName

#Configuring jdk and web container
# Set Java runtime to 1.8 | Tomcat. In order to deploy war, site should be configured to run with stack = TOMCAT
# or JBOSSEAP (only availble on Linux). In this test case, it creates Windows app.
$javaVersion="1.8"
$javaContainer="TOMCAT"
$javaContainerVersion="8.5"
$PropertiesObject = @{javaVersion = $javaVersion;javaContainer = $javaContainer;javaContainerVersion = $javaContainerVersion}
New-AzResource -PropertyObject $PropertiesObject -ResourceGroupName $rgname -ResourceType Microsoft.Web/sites/config -ResourceName "$appName/web" -ApiVersion 2018-02-01 -Force

$warPath = Join-Path $ResourcesPath "HelloJava.war"
$publishedApp = Publish-AzWebApp -ResourceGroupName $rgname -Name $appName -ArchivePath $warPath -Force

Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Websites/Websites/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release

* Fixed `Publish-AzWebApp` to use latest publish API when deploying war package [#19791]
## Version 2.11.4
* Fixed `Import-AzWebAppKeyVaultCertificate` to use certificate naming convention same as Az-CLI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public override void ExecuteCmdlet()

if (ArchivePath.ToLower().EndsWith("war"))
{
deployUrl = user.ScmUri + "/api/wardeploy?isAsync=true";
deployUrl = user.ScmUri + "/api/publish?type=war";
}
else if (ArchivePath.ToLower().EndsWith("zip") || ArchivePath.ToLower().EndsWith("jar"))
{
Expand Down

0 comments on commit f3cdf6f

Please sign in to comment.