Postman 同步邮递员与azure devops
我可以在azure devops中成功运行邮递员测试,有没有办法Postman 同步邮递员与azure devops,postman,azure-devops-rest-api,Postman,Azure Devops Rest Api,我可以在azure devops中成功运行邮递员测试,有没有办法 创建回购“MyCollection” 运行一个“Cron”管道,获取集合并将其保存到repo 任何建议检查此扩展,默认情况下,它将下载您的postman json文件并将其保存到$(Build.ArtifactStagingDirectory),然后我们可以通过git cmd将文件推送到Azure DevOps repo cd $(Build.ArtifactStagingDirectory) git config --glob
$(Build.ArtifactStagingDirectory)
,然后我们可以通过git cmd将文件推送到Azure DevOps repo
cd $(Build.ArtifactStagingDirectory)
git config --global user.name "{email}"
git checkout master
git add .
git commit -m "Sync postman json file to Azure DevOps Repo"
git push https://{PAT}@dev.azure.com/{org name}/{project name}/_git/{repo name}
您还可以查看此项以了解更多详细信息
更新1
亚马尔
结果:
非常感谢。刚刚看到这个。阅读并尝试看看我是否可以在Task中实现它谢谢您的时间您知道我是否可以告诉您要保存哪个集合吗?是否可以使用newman任务导出集合并将其保存到repo,在“无此类文件或目录打开”的情况下执行以下崩溃任务:oneLuckiGetPostmanScripts@1输入:文件位置:'$(Build.ArtifactStagingDirectory)/Postman'apiKey:'$(PostmanApiKey)'pauseDuration:'100'下载环境:falshi@developer9969,我只有一个集合,它将josn文件保存到我的repo。另外,你能在这里分享详细日志吗?根据错误消息,似乎找不到路径,我已经更新了答案,您可以检查它,然后在这里分享结果。谢谢您的帮助。一切都好!
- task: oneLuckiGetPostmanScripts@1
displayName: 'Get Postman Script'
inputs:
fileLocation: '$(Build.ArtifactStagingDirectory)\Postman'
apiKey: '{key}'