quiet period with web hook

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

quiet period with web hook

Douglas Ferguson-2
We have a php script that is listening for a post commit web hook call so that whenever commits happen the php script will use curl to make a request to the hudson gui to kick of a build.

Problem is that this doesn't work with the "quiet period".

Is there a way to send a signal to hudson that will queue a build after the quite period, and if other build requests come in while something is already queued it will just ignore them.

D/


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: quiet period with web hook

Kohsuke Kawaguchi-2
Douglas Ferguson wrote:
> We have a php script that is listening for a post commit web hook call so that whenever commits happen the php script will use curl to make a request to the hudson gui to kick of a build.
>
> Problem is that this doesn't work with the "quiet period".
>
> Is there a way to send a signal to hudson that will queue a build after
> the quite period, and if other build requests come in while something is
> already queued it will just ignore them.

Yes, see pages likes http://yourserver/hudson/job/FOOBAR/api/ and it'll
tell you how to do that. Basically, if you invoke the .../build URL,
it'll schedule a new build with the quiet period configured for that
job. Using ?delay=... would let the caller control the delay.

>
> D/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: quiet period with web hook

Douglas Ferguson-2
Nice..

We are actually using..

?delay=0  

What unit is delay?
Assuming it is in seconds, what happens in the following scenario?

1) ?delay=6
2) 2 seconds later ?delay=6   - does this get ignored since it came in before the 6 minutes are up?
3) 5 seconds later (total of 7 since the first request) - doest this get ignore since it is less than 6 before the most recent request or is it run because it is >6 since the first request?



On Feb 18, 2010, at 8:48 PM, Kohsuke Kawaguchi wrote:

> Douglas Ferguson wrote:
>> We have a php script that is listening for a post commit web hook call so that whenever commits happen the php script will use curl to make a request to the hudson gui to kick of a build.
>>
>> Problem is that this doesn't work with the "quiet period".
>>
>> Is there a way to send a signal to hudson that will queue a build after
>> the quite period, and if other build requests come in while something is
>> already queued it will just ignore them.
>
> Yes, see pages likes http://yourserver/hudson/job/FOOBAR/api/ and it'll
> tell you how to do that. Basically, if you invoke the .../build URL,
> it'll schedule a new build with the quiet period configured for that
> job. Using ?delay=... would let the caller control the delay.
>
>>
>> D/
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: quiet period with web hook

Douglas Ferguson-2
In reply to this post by Kohsuke Kawaguchi-2
We are using ?delay=0 if we change it do
On Feb 18, 2010, at 8:48 PM, Kohsuke Kawaguchi wrote:

> Douglas Ferguson wrote:
>> We have a php script that is listening for a post commit web hook call so that whenever commits happen the php script will use curl to make a request to the hudson gui to kick of a build.
>>
>> Problem is that this doesn't work with the "quiet period".
>>
>> Is there a way to send a signal to hudson that will queue a build after
>> the quite period, and if other build requests come in while something is
>> already queued it will just ignore them.
>
> Yes, see pages likes http://yourserver/hudson/job/FOOBAR/api/ and it'll
> tell you how to do that. Basically, if you invoke the .../build URL,
> it'll schedule a new build with the quiet period configured for that
> job. Using ?delay=... would let the caller control the delay.
>
>>
>> D/
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: quiet period with web hook

Douglas Ferguson-2
In reply to this post by Douglas Ferguson-2
I just found this:

> It affects all the invocations to the build URL, too. You can keep the
> same script, and it will now mean "if no commit is observed within N
> secs time window, start a new build".
>
> That is, the behavior difference is when a new commit arrives while in a
> quiet period. It used to be that this didn't affect the quiet period
> counter, but 1.238 and onward, it will reset the quiet period counter.
>
> This is except when delay=0sec is given, which means "I want to build
> NOW!", and that really means now. In that case, screw the quiet period,
> and the build will start immediately.



On Feb 18, 2010, at 11:43 PM, Douglas Ferguson wrote:

> Nice..
>
> We are actually using..
>
> ?delay=0  
>
> What unit is delay?
> Assuming it is in seconds, what happens in the following scenario?
>
> 1) ?delay=6
> 2) 2 seconds later ?delay=6   - does this get ignored since it came in before the 6 minutes are up?
> 3) 5 seconds later (total of 7 since the first request) - doest this get ignore since it is less than 6 before the most recent request or is it run because it is >6 since the first request?
>
>
>
> On Feb 18, 2010, at 8:48 PM, Kohsuke Kawaguchi wrote:
>
>> Douglas Ferguson wrote:
>>> We have a php script that is listening for a post commit web hook call so that whenever commits happen the php script will use curl to make a request to the hudson gui to kick of a build.
>>>
>>> Problem is that this doesn't work with the "quiet period".
>>>
>>> Is there a way to send a signal to hudson that will queue a build after
>>> the quite period, and if other build requests come in while something is
>>> already queued it will just ignore them.
>>
>> Yes, see pages likes http://yourserver/hudson/job/FOOBAR/api/ and it'll
>> tell you how to do that. Basically, if you invoke the .../build URL,
>> it'll schedule a new build with the quiet period configured for that
>> job. Using ?delay=... would let the caller control the delay.
>>
>>>
>>> D/
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>>
>> --
>> Kohsuke Kawaguchi
>> Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]