我正在尝试执行一项任务,以发布复制的文件。
看着the help
我认为我应该可以使用
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '..\out2'
displayName: 'Publish Artifact: drop'
但是智能告诉我
unexpected property pathtoPublish
无论如何我尝试保存时都会得到
Could not queue the build because there were validation errors or warnings. /azure-pipelines.yml (Line: 41, Col: 10): Unexpected value '' /azure-pipelines.yml (Line: 42, Col: 3): Unexpected value 'pathtoPublish'
奇怪的是,Intellisense也表明
存在问题inputs:
错误是
Incorrect type. Expected "object"
[更新]
Yan建议缩进2个空格会有所帮助,但会引发一些新问题
[更新]
我更改为
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '..\out2'
ArtifactName: drop'
并能够保存YAML 运行时会提示错误
Publishing build artifacts failed with an error: Not found PathtoPublish: C:\Users\kgreed\Downloads\vsts-agent-win-x64-2.147.1\_work\1\out2
答案 0 :(得分:1)
pathtoPublish应该缩进:
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '..\out2'
ArtifactName: drop