Trigger a Jenkins build on Azure Blob update

ⅰ亾dé卋堺 提交于 2021-01-29 13:15:32

问题


Previously I had created an automation job for AWS where Jenkins keeps an eye on an SQS queue using the Jenkins AWS SQS Plugin and triggers a build job when it finds a message in the queue. The queue is configured to receive notification from an S3 Bucket whenever any "create" event occurs.

I am trying to test out a similar process on Microsoft Azure platform and am a little confused as to which Azure services to use. I see that Azure Event Grid can be used or maybe we can directly post notification from Blob Storage service or maybe use Azure Service Bus ?!?

Also, I did found a Jenkins Azure Storage plugin which has a slightly different but useful functionality.

As for documentation, I found only one link that is close to how this might be done but that too seems incomplete..

Any and all help appreciated.


回答1:


You can use Azure Functions for it. Write a code that will be triggered when a new blob arrives / existing blob gets updated, then do a request to your jenkins to queue a build.

Here are useful links:

https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-storage-blob-triggered-function

https://wiki.jenkins.io/display/JENKINS/Remote+access+API



来源:https://stackoverflow.com/questions/58400293/trigger-a-jenkins-build-on-azure-blob-update

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