Closed sahgilbert closed 1 year ago
I've never tried deploying to a Linux server with WebDeploy and I'm not even sure if it's supported as WebDeploy is strictly Windows technology. Try using Zip Push deployment instead: https://www.appveyor.com/docs/deployment/azure-app-service-zip-push-deploy/
I've built a demo Asp.Net MVC Core 7.0 project here.
Here is the AppVeyor log output:
Here is the Azure App Service:
Here is the AppVeyor YAML file:
#---------------------------------#
# general configuration #
#---------------------------------#
version: 1.0.{build}-{branch}
branches:
only:
- master
#---------------------------------#
# environment configuration #
#---------------------------------#
clone_depth: 1
image: Visual Studio 2022
cache:
- '%LocalAppData%\NuGet\Cache' # NuGet < v3
- '%LocalAppData%\NuGet\v3-cache' # NuGet v3
init:
- cmd: git config --global core.autocrlf true
#---------------------------------#
# build configuration #
#---------------------------------#
platform: Any CPU
configuration: Release
before_build:
- cmd: dotnet --version
- cmd: dotnet restore ./AppVeyorLinuxDeploymentTest/AppVeyorLinuxDeploymentTest.csproj --verbosity m
build:
publish_wap_xcopy: true
parallel: true
verbosity: detailed
build_script:
- cmd: dotnet publish ./AppVeyorLinuxDeploymentTest/AppVeyorLinuxDeploymentTest.csproj
#---------------------------------#
# test configuration #
#---------------------------------#
test_script:
- cmd: dotnet build ./UnitTests/UnitTests.csproj --verbosity m
- cmd: dotnet test
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
- path: '.\AppVeyorLinuxDeploymentTest\bin\Any CPU\Release\net7.0\publish'
name: WebsiteSourceCode
type: Zip
#---------------------------------#
# deployment configuration #
#---------------------------------#
deploy:
- provider: AzureAppServiceZipDeploy
server: https://house-platform-dev.scm.azurewebsites.net:443/msdeploy.axd?site=house-platform-dev
website: house-platform-dev
username: $house-platform-dev
password:
secure: Tn4uvnR63Vzm4045D+xUnABHny9FWO4LAJnB0aLqVrDjnNHvjedQsaYO2rwHBXErbbCOFUN4LvLn0zLl1R1BLg==
artifact: WebsiteSourceCode
aspnet_core: true
app_offline: true
do_not_use_checksum: true
aspnet_core_force_restart: true
@FeodorFitsner What have I not configured correctly in the YAML file? Thanks
It won't work if you just replace provider name. AzureAppServiceZipDeploy
deployment provider has its own unique settings: https://www.appveyor.com/docs/deployment/azure-app-service-zip-push-deploy/#provider-settings
Yes, and the YAML I posted above contains the various settings for using AzureAppServiceZipDeploy.
I rebooted the server and the application has deployed successfully.
OK, thank you for the update!
The Linux server is deployed and running... How do I fix this error?
Here is my appveyor.yml file:
Thank you