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]
  • Loading branch information
Xuejun Li committed Oct 24, 2022
1 parent dc20fea commit e405d9b
Show file tree
Hide file tree
Showing 5 changed files with 529 additions and 347 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,4 @@ src/DataFactory/DataFactoryV2.Test/SessionRecords/Microsoft.Azure.Commands.DataF

# GitHub codespaces
.venv
/src/Websites/testEnvironments.json
12 changes: 11 additions & 1 deletion src/Websites/Websites.Test/ScenarioTests/WebAppTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,17 @@ 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 e405d9b

Please sign in to comment.