如何通过 azure release 部署到 VM?
How to deploy via azure release to VM?
-
azure-devops
-
azure-pipelines-build-task
-
azure-pipelines
-
azure-pipelines-release-pipeline
-
azure-pipelines-yaml
我正在尝试在 azure devops 中设置一个发布管道,它应该将我的网站部署到虚拟机,也就是说,更新 IIS 上已经 运行 的现有网站。
我收到以下错误:
2021-02-25T20:47:55.4825268Z ##[error]Failed to deploy web package to IIS website.
2021-02-25T20:47:55.4836851Z ##[error]Error: The account 'RISK\PANDA' does not appear to be valid. The account was obtained from this location: 'system.applicationHost/applicationPools/DataConverterAPI'.
Error: Some or all identity references could not be translated.
Error count: 1.
2021-02-25T20:47:55.4839506Z ##[error]Error: The process 'C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe' failed with exit code 4294967295
这是我的构建管道 .yml 文件内容:
# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
userPassword: 'myPass'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
IIS Web 应用程序管理任务 .yml:
steps:
- task: IISWebAppManagementOnMachineGroup@0
displayName: 'IIS Web App Manage'
inputs:
WebsiteName: DataConverterAPI
WebsitePhysicalPath: '%SystemDrive%\DataConverterAPI'
AddBinding: True
Bindings: '{"bindings":[{"protocol":"http","ipAddress":"All Unassigned","port":"50352","hostname":"","sslThumbprint":"","sniFlag":false}]}'
BasicAuthenticationForWebsite: true
WindowsAuthenticationForWebsite: false
ParentWebsiteNameForVD: DataConverterAPI
ParentWebsiteNameForApplication: DataConverterAPI
IIS Web 应用程序部署任务 .yml:
steps:
- task: IISWebAppDeploymentOnMachineGroup@0
displayName: 'IIS Web App Deploy'
inputs:
WebSiteName: DataConverterAPI
TakeAppOfflineFlag: True
XmlVariableSubstitution: True
有人帮忙
好的,我通过更改我的应用程序 运行 'ApplicationPoolIdentity'
所在的池标识来解决此问题
遗憾的是我还不知道为什么它解决了这个问题,任何意见将不胜感激
azure-devops
azure-pipelines-build-task
azure-pipelines
azure-pipelines-release-pipeline
azure-pipelines-yaml
我正在尝试在 azure devops 中设置一个发布管道,它应该将我的网站部署到虚拟机,也就是说,更新 IIS 上已经 运行 的现有网站。 我收到以下错误:
2021-02-25T20:47:55.4825268Z ##[error]Failed to deploy web package to IIS website.
2021-02-25T20:47:55.4836851Z ##[error]Error: The account 'RISK\PANDA' does not appear to be valid. The account was obtained from this location: 'system.applicationHost/applicationPools/DataConverterAPI'.
Error: Some or all identity references could not be translated.
Error count: 1.
2021-02-25T20:47:55.4839506Z ##[error]Error: The process 'C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe' failed with exit code 4294967295
这是我的构建管道 .yml 文件内容:
# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
userPassword: 'myPass'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
IIS Web 应用程序管理任务 .yml:
steps:
- task: IISWebAppManagementOnMachineGroup@0
displayName: 'IIS Web App Manage'
inputs:
WebsiteName: DataConverterAPI
WebsitePhysicalPath: '%SystemDrive%\DataConverterAPI'
AddBinding: True
Bindings: '{"bindings":[{"protocol":"http","ipAddress":"All Unassigned","port":"50352","hostname":"","sslThumbprint":"","sniFlag":false}]}'
BasicAuthenticationForWebsite: true
WindowsAuthenticationForWebsite: false
ParentWebsiteNameForVD: DataConverterAPI
ParentWebsiteNameForApplication: DataConverterAPI
IIS Web 应用程序部署任务 .yml:
steps:
- task: IISWebAppDeploymentOnMachineGroup@0
displayName: 'IIS Web App Deploy'
inputs:
WebSiteName: DataConverterAPI
TakeAppOfflineFlag: True
XmlVariableSubstitution: True
有人帮忙
好的,我通过更改我的应用程序 运行 'ApplicationPoolIdentity'
所在的池标识来解决此问题遗憾的是我还不知道为什么它解决了这个问题,任何意见将不胜感激