jenkins waiting for a event to happen
What is the best way to allow jenkins to act on something when a event happens, meanwhile it can wait for the event?
I was thinking of writing an ant script that can prob a process that it started to see if it had completed yet before moving onto another task, but I'm not sure it's a good idea to do that, perhaps just use a shell script开发者_JAVA百科? Just wanted to know what is your experience with doing something like that.
Jenkins should not wait. A job build should be triggered from the 'something' event. This can be acomplished by a wget on an URL like http://jenkins.myserver.com:8080/job/myjob/buildWithParameters?delay=0sec&myparm=42
. You can also use the jenkins CLI.
try this plugin: https://plugins.jenkins.io/webhook-step/ As per the documentation: This pipeline plugin provides an easy way to block a build pipeline until an external system posts to a webhook. It can be used to integrate long running tasks into a pipeline, without busy waiting.
精彩评论