Rei*_*jer 2 azure-devops azure-pipelines
我的目标是
\n\n我已完成第 1 步,但我似乎找不到从 API 调用中提取的文件。\n这是获取邮递员脚本的 API 调用的日志:
\n\n2020-02-11T13:54:34.8779080Z attempting to call Postman API for environment..\n2020-02-11T13:54:34.8781038Z file /home/vsts/work/1/a/postman\\EA.API.pipeline.json Saved!\nRun Code Online (Sandbox Code Playgroud)\n\n这是测试阶段运行邮递员脚本步骤的结果(我尝试访问pilot.environment和EA.API.pipeline.json):
\n\nerror: ENOENT: no such file or directory, open \'/home/vsts/work/1/a/postman/environments/pilot.environment.json\'\nRun Code Online (Sandbox Code Playgroud)\n\n现在我考虑的一个选项是在阶段之间擦除这些目录。我在构建阶段获取脚本,并尝试在测试阶段运行它们。这就是为什么在提取脚本后,我确保它们实际上在存储中,然后我尝试将它们作为工件发布:
\n\n========================== Starting Command Output ===========================\n/bin/bash --noprofile --norc /home/vsts/work/_temp/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx.sh\n/home/vsts/work/1/a\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 postman\\\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 postman\\EA.API.pipeline.json\nRun Code Online (Sandbox Code Playgroud)\n\n但在同一构建阶段的下一步中,我尝试将这些测试作为工件发布,并收到此错误:
\n\n##[error]Path does not exist: /home/vsts/work/1/a/postman/EA.API.pipeline.json\nRun Code Online (Sandbox Code Playgroud)\n\n这是 yaml:
\n\n - task: OneLuckiDev.getPostmanJSON.vsts-release-web-test.oneLuckiGetPostmanScripts@1\n displayName: \'Get Postman Script\'\n inputs:\n fileLocation: \'$(build.artifactstagingdirectory)/postman\'\n apiKey: \'$(PostmanAPIKey)\'\n - script: \'sudo apt-get install tree\'\n displayName: \'install tree\'\n - script: \'tree "$(build.artifactstagingdirectory)"\'\n displayName: \'run tree\' \n - task: PublishPipelineArtifact@1\n displayName: \'Publish Artifact: postman API tests\'\n inputs:\n targetPath: \'$(build.artifactstagingdirectory)/postman/EA.API.pipeline.json\'\n artifact: PostmanAPITests\n publishLocation: \'pipeline\'\nRun Code Online (Sandbox Code Playgroud)\n\n为什么我找不到我的文件?
\n这似乎是你的斜线的问题。您的任务 OneLuckiDev.getPostmanJSON.vsts-release-web-test.oneLuckiGetPostmanScripts@1 似乎是为 Windows 代理编写的,但您正在使用 Linux 代理。这导致它在保存脚本时附加反斜杠,该反斜杠对于代理来说仅被视为文件名的一部分。文件 postman\EA.API.pipeline.json 是您保存的脚本。
| 归档时间: |
|
| 查看次数: |
9737 次 |
| 最近记录: |