Azure管道通用软件包任务失败,错误为“提供的软件包名称无效”。 [英] Azure pipelines Universal Package Task fails with error "The package name provided is invalid"

查看:161
本文介绍了Azure管道通用软件包任务失败,错误为“提供的软件包名称无效”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我管道的Yaml文件中的片段,我将构建目录存档到该构建目录中,然后将其发布到工件中,然后尝试使该工件作为Azure工件中的通用包提供。

Snippet from Yaml file of my pipeline where I archive the build directory, publish it to artifacts and then try to make the artifact available as a universal package in Azure Artifacts.

- task: ArchiveFiles@2
  inputs:
    rootFolderOrFile: '$(Build.SourcesDirectory)/Software/MCU/build/pkgs'
    archiveType: 'zip'
    archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip

- task: PublishBuildArtifacts@1
  inputs:
    pathtoPublish: '$(Build.ArtifactStagingDirectory)'
    artifactName: MCU_Build

- task: UniversalPackages@0
  inputs:
    command: 'publish'
    publishDirectory: '$(Build.ArtifactStagingDirectory)'
    feedsToUsePublish: 'internal'
    vstsFeedPublish: '354355534-bcc1-4c84-935e-19d399d1a6be/4dff5f18-2cc7-4a5b-bfb1-307e59c7de32'
    vstsFeedPackagePublish: 'MCU_Build'
    versionOption: 'major'
    packagePublishDescription: 'MCU Package'

我已经在Azure工件中创建了一个名为 MCU_Package的供稿。但是运行文件时出现此错误:

I have create a feed in the Azure Artifacts named "MCU_Package". But when run the file I get this error:

{"@t":"2020-05-28T03:24:49.6036932Z","@m":"**The package name provided is invalid**. Universal package names must be one or more lowercase alphanumeric segments separated by a dash, dot or underscore. The package name must be under 256 characters.","@i":"69c271d4","@l":"Error","SourceContext":"ArtifactTool.Program","UtcTimestamp":"2020-05-28 03:24:49.603Z"}

[error]Error: An unexpected error occurred while trying to push the package. Exit code(20) and error({"@t":"2020-05-28T03:24:33.6970608Z","@m":"ApplicationInsightsTelemetrySender will correlate events with X-TFS-Session 4d177101-a80f-4f0d-abd7-c677a260475e","@i":"019a973c","SourceContext":"ArtifactTool.Commands.UPackPublishCommand","UtcTimestamp":"2020-05-28 03:24:33.697Z"}

这里出什么问题了?

推荐答案

包名称不能包含大写字符。

The package name can't contain uppercase characters.

- task: UniversalPackages@0
  inputs:
    command: 'publish'
    publishDirectory: '$(Build.ArtifactStagingDirectory)'
    feedsToUsePublish: 'internal'
    vstsFeedPublish: '354355534-bcc1-4c84-935e-19d399d1a6be/4dff5f18-2cc7-4a5b-bfb1-307e59c7de32'
    vstsFeedPackagePublish: 'mcu-build'
    versionOption: 'major'
    packagePublishDescription: 'MCU Package'

这篇关于Azure管道通用软件包任务失败,错误为“提供的软件包名称无效”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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