I have a statically rendered GatsbyJs app that I want to trigger deployment for when my CMS service prismic sends out it's webhook on content changing as my static files don't magically update!
Is there any way to trigger a pipeline via a webhook?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@falconmick, If it can't you could write a Azure Function which is triggered by the webhook, that can call the Azure DevOps REST API to trigger the build, issue is how you get the PAT in there securely.
@falconmick by any chance did you manage to find a solution to this? am currently facing the same problem
I have done this using function app. If u need any help I'll prepare a short tutorial for u
@aniketprashar Thanks, that would be helpful
I have done this using function app. If u need any help I'll prepare a short tutorial for u
@aniketprashar , that would be awesome! i have been stuck on this problem for a long time!
@Abdulhakimsg @phatcher I'll share it before monday (IST)
Hi @Abdulhakimsg @phatcher Really sorry for the delay...I'm extremely busy...can u please mail me @[email protected] for ur queries. I'll try to explain u what i have done. Meanwhile i'll try to prepare a tutorial this weekend
@aniketprashar Any chance this happened. I'm in the same boat. Trying to trigger an Azure DevOps build from a webhook via GraphCMS.
I get that I will need to build a function app. Just not sure how to actually get the build churning from the function app.
@aniketprashar @sheldonj I also needed this and hacked together an example in my fork of https://github.com/mcdafydd/go-azuredevops/tree/master/examples/webhook. This example uses a "code pushed" event webhook from an Azure Devops team project and then queues a build in that same project. You could pull the Builds.Queue() portion out of the code and give it a try. One thing to note is that you need to supply the build ID in the API calls.
The az cli also supports triggering a build (az pipelines build queue -h) It does a GET request to pull the build ID number from the supplied name first.
Best of luck!
hi, I',m also wanting to do this. trigger a gatsby build from a webhook from prismic.
Ditto - any way to do this?
Want to trigger a build when content is pushed to prismic.
Same need
@phatcher @falconmick @sheldonj @steved0x @bitsofinfo @trickydisco78 @Abdulhakimsg @mcdafydd
I think the webhook resource type would do this now https://docs.microsoft.com/en-us/azure/devops/pipelines/process/resources?view=azure-devops&tabs=schema
@danquirk Thanks a lot for pointing this out. Works for me!
@eimerreis how did you get this to work?
Most helpful comment
I have done this using function app. If u need any help I'll prepare a short tutorial for u