我管道的Yaml文件中的片段,我将构建目录存档到该构建目录中,然后将其发布到工件,然后尝试使该工件作为Azure工件中的通用包提供。
- 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”的提要。但是在运行文件时出现此错误:
{"@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"}
这是怎么了?
答案 0 :(得分:2)
程序包名称不能包含大写字符。
- 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'