Trigger VSTS/TFS build based on blob

我与影子孤独终老i 提交于 2019-12-13 16:35:45

问题


Is it possible to trigger an VSTS/TFS build based on the condition if a blob in a storage account is updated?

I tried to create a function app, but with little to no result, I cannot trigger a VSTS/TFS build.


回答1:


Easiest solution (from my understanding) will be to use a logic app:

  • Create a logic app that is triggered whenever a blob is added/updated into a specific container.
  • Queue a VSTS build

NOTE

your VSTS account should have "Third-party application access via OAuth" enabled. (Go to Administration > Control panel > Settings page)




回答2:


According to the official docs, it is possible to:

...start a function when a new or updated blob is detected. The blob contents are provided as input to the function.

Then, the only thing the Azure function should do it to queue a build in VSTS with the help of REST API. You might also want to check the Getting Started page of VSTS REST API docs - it contains the basic samples to quickly get up to speed.



来源:https://stackoverflow.com/questions/50235934/trigger-vsts-tfs-build-based-on-blob

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!