gpt4 book ai didi

azure-devops - Azure DevOps Pipeline 永远停留在 Pending

转载 作者:行者123 更新时间:2023-12-05 08:16:50 30 4
gpt4 key购买 nike

我们有一个 Azure DevOps 管道在没有并行性的自托管上运行,没有运行它的部署作业或步骤。

我在下面发布的版本将有两个阶段,但请注意,我已经通过删除第二阶段并将整个阶段转换为作业来尝试此操作,但结果仍然相同。我还应该注意到,我有多个管道和多个运行良好的作业,这似乎是特定部署作业的问题。

第二阶段永远停留在Pending(“Job is Pending”)。它永远不会继续开始运行。

First Attempt

Deploy Stage Not Started

Job is Pending

舞台也不能取消,按照上图卡了2个月。我还应该注意,我已将此提交给 developercommunity.visualstudio.com 上的 Azure 开发人员社区,但我认为他们已经放弃了我的票。

我确信在 Azure DevOps 中有许多成功的 CI/CD 部署,我只是不知道我在这里做错了什么。我在我们手动运行的单独发布管道中使用了一种工作方法。

以下是受影响的管道,将不胜感激任何指导。

  trigger: none

variables:
ArtifactPackageName: 'app.zip'
DeploySite.IISDeploymentType: 'IISWebsite'
DeploySite.ActionIISWebsite: 'CreateOrUpdateWebsite'
DeploySite.WebsiteName: 'REDACTED'
DeploySite.WebsitePhysicalPath: '%SystemDrive%\inetpub\wwwroot\REDACTED'
DeploySite.AddBinding: false
DeploySite.VirtualPathForApplication: '/REDACTED'
DeploySite.AppPoolName: 'REDACTED'
DeploySite.VirtualApplication: 'REDACTED'
DeploySite.Package: $(Pipeline.Workspace)/drop/$(ArtifactPackageName)
DeploySite.RemoveAdditionalFilesFlag: true
DeploySite.TakeAppOfflineFlag: true
DeploySite.XmlTransformation: false
DeploySite.XmlVariableSubstitution: true
DeploySite.SetParametersFile: $(Pipeline.Workspace)/drop/REDACTED.SetParameters.xml
DeploySite.JSONSettingsFiles: '**/appsettings.json'

stages:
- stage: 'Build'
displayName: 'Build'
jobs:
- job: 'Build'
displayName: 'Build'
pool:
name: REDACTED
variables:
Solution: '**/*.sln'
BuildPlatform: 'Any CPU'
BuildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@1
displayName: 'Install NuGet Tools'
- task: NuGetCommand@2
displayName: 'Restore NuGet Packages'
inputs:
restoreSolution: '$(Solution)'
- task: VSBuild@1
displayName: 'MSBuild'
inputs:
solution: '$(Solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=false /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(Build.ArtifactStagingDirectory)\$(ArtifactPackageName)"'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Build Artifacts'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: drop
publishLocation: 'Container'

- stage: 'Deploy'
displayName: 'Deploy'
dependsOn: 'Build'
jobs:
- deployment: 'Deploy'
displayName: 'Deploy'
continueOnError: false
timeoutInMinutes: 10
workspace:
clean: all
pool:
name: REDACTED
environment:
name: SERVER-DEV
resourceType: VirtualMachine
strategy:
runOnce:
deploy:
steps:
- download: current
displayName: 'Download Artifact'
artifact: drop
- task: IISWebAppManagementOnMachineGroup@0
displayName: 'Stop IIS App Pool'
continueOnError: false
inputs:
IISDeploymentType: IISApplicationPool
ActionIISApplicationPool: StopAppPool
StartStopRecycleAppPoolName: '$(Parameters.WebsiteName)'
- task: IISWebAppDeploymentOnMachineGroup@0
displayName: 'IIS Web App Deploy'
continueOnError: false
inputs:
WebSiteName: '$(DeploySite.WebsiteName)'
VirtualApplication: '$(DeploySite.VirtualApplication)'
Package: '$(DeploySite.Package)'
RemoveAdditionalFilesFlag: $(DeploySite.RemoveAdditionalFilesFlag)
SetParametersFile: $(DeploySite.SetParametersFile)
TakeAppOfflineFlag: $(DeploySite.TakeAppOfflineFlag)
XmlTransformation: $(DeploySite.XmlTransformation)
XmlVariableSubstitution: $(DeploySite.XmlVariableSubstitution)
JSONFiles: $(DeploySite.JSONSettingsFiles)
- task: IISWebAppManagementOnMachineGroup@0
displayName: 'Start IIS App Pool'
continueOnError: true
inputs:
IISDeploymentType: IISApplicationPool
ActionIISApplicationPool: StartAppPool
StartStopRecycleAppPoolName: '$(Parameters.WebsiteName)'

最佳答案

我有同样的错误。我将 - deployment: Deploy 重命名为 - deployment: Deployment...它开始起作用。

关于azure-devops - Azure DevOps Pipeline 永远停留在 Pending,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67643096/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com