Пакет с указанным шаблоном не найден: d: \ a \ r1 \ a \ ** \ *. Zip Проверить, опубликован ли упомянутый в задаче пакет как артефакт - PullRequest
0 голосов
/ 13 июля 2020

Я создаю конвейер сборки и выпуска для своего. Net core FunctionApp в Azure. Я получаю следующую ошибку:

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://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 Ответ

0 голосов
/ 14 июля 2020

1. Убедитесь, что вы установили конвейер сборки в качестве источника артефактов, и сборка действительно предоставляет артефакты:

enter image description here

enter image description here

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

enter image description here

введите описание изображения здесь

Затем вы можете проверить, может ли ваш выпуск получить требуемый файл xx.zip с помощью этой опции. Также вы можете указать путь к файлу, используя эту опцию.

...