找不到具有指定模式的软件包:d:\ a \ r1 \ a \ ** \ *.zip< br/>检查任务中提到的软件包是否作为工件发布 [英] 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

查看:49
本文介绍了找不到具有指定模式的软件包:d:\ a \ r1 \ a \ ** \ *.zip< br/>检查任务中提到的软件包是否作为工件发布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am creating a Build and release pipeline for my .Net core FunctionApp in Azure. I am getting the following error

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文件

Below is the yaml file of the pipeline

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://docs.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'

         

发布配置

推荐答案

1.确保已将Build Pipeline设置为工件源,并且该构建确实提供了工件:

1.Make sure you've set the Build Pipeline as artifact source, and the build do provide the artifacts:

2.如果问题仍然存在,请尝试通过 Browse Package或folder 选项指定路径:

2.If the issue persists, try to specify the path via Browse Package or folder option:

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

Then you can check if your release can get the required xx.zip file via this option. Also you can choose to specify the file path using this option.

这篇关于找不到具有指定模式的软件包:d:\ a \ r1 \ a \ ** \ *.zip&lt; br/&gt;检查任务中提到的软件包是否作为工件发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆