gpt4 book ai didi

azure - 找不到具有指定模式 : d:\a\r1\a\**\*. zip 的包
检查任务中提到的包是否作为工件发布

转载 作者:行者123 更新时间:2023-12-03 02:37:13 24 4
gpt4 key购买 nike

我正在 Azure 中为我的 .Net core FunctionApp 创建构建和发布管道。我收到以下错误

2020-07-13T07:59:10.6443361Z ##[error]Error: No package found with specified pattern: d:\a\r1\a\**\*.zip<br/>Check if the package mentioned in the task is published as an artifact in the build or a previous stage and downloaded in the current job.

下面是管道的yaml文件

YAML 文件

# .NET Core Function App to Windows on Azure
# Build a .NET Core function app and deploy it to Azure as a Windows function App.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://learn.microsoft.com/en-us/azure/devops/pipelines/languages/dotnet-core

trigger:
- master

variables:
# Azure Resource Manager connection created during pipeline creation
azureSubscription: 'f296911a-0481-4fed-ba93-a30ef6a5b0f2'

# Function app name
functionAppName: 'srlcustomermanagerapp'

# Agent VM image name
vmImageName: 'vs2017-win2016'

# Working Directory
workingDirectory: '$(System.DefaultWorkingDirectory)/CustomerOrderApi'

stages:
- stage: Build
displayName: Build stage

jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)

steps:
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: 'build'
projects: |
$(workingDirectory)/*.csproj
arguments: --output $(System.DefaultWorkingDirectory)/publish_output --configuration Release

- task: ArchiveFiles@2
displayName: 'Archive files'
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/publish_output'
includeRootFolder: false
archiveType: zip
archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
replaceExistingArchive: true

- publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
artifact: drop

- stage: Deploy
displayName: Deploy stage
dependsOn: Build
condition: succeeded()

jobs:
- deployment: Deploy
displayName: Deploy
environment: 'development'
pool:
vmImage: $(vmImageName)

strategy:
runOnce:
deploy:

steps:
- task: AzureFunctionApp@1
displayName: 'Azure functions app deploy'
inputs:
azureSubscription: '$(azureSubscription)'
appType: functionApp
appName: $(functionAppName)
package: '$(Pipeline.Workspace)/drop/$(Build.BuildId).zip'


发布配置

enter image description here

最佳答案

1.确保您已将构建管道设置为工件源,并且构建确实提供了工件:

enter image description here

enter image description here

2.如果问题仍然存在,请尝试通过浏览包或文件夹选项指定路径:

enter image description here

enter image description here

然后您可以通过此选项检查您的版本是否可以获取所需的xx.zip文件。您也可以选择使用此选项指定文件路径。

关于azure - 找不到具有指定模式 : d:\a\r1\a\**\*. zip 的包<br/>检查任务中提到的包是否作为工件发布,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62871810/

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