Flexibility in the SCM polling mechanism.

11 messages Options
Embed this post
Permalink
bsrinath

Flexibility in the SCM polling mechanism.

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hello All,

 

I have the ability to configure multiple SCMs, but when it comes to polling, each one of the listed SCM is polled. In our setup, we don’t want to poll all the SCMs, just a few of them. Ability to configure SCM polling criteria for trigger purposes for each SCM is what I am looking for. Is there a way to do this already or would that be a feature request?

 

Thanks,

-Srinath

Sami Tikka

Re: Flexibility in the SCM polling mechanism.

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
You could set up a hook script into your SCM and disable polling. That would give you maximum flexibility to determine whoch commits should launch a build. 


-- Sami

On 23.10.2009, at 1.46, "Balaraman, Srinath" <[hidden email]> wrote:

Hello All,

 

I have the ability to configure multiple SCMs, but when it comes to polling, each one of the listed SCM is polled. In our setup, we don’t want to poll all the SCMs, just a few of them. Ability to configure SCM polling criteria for trigger purposes for each SCM is what I am looking for. Is there a way to do this already or would that be a feature request?

 

Thanks,

-Srinath

bsrinath

RE: Re: Flexibility in the SCM polling mechanism.

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Great! that’s interesting. Can you please give me a little bit more info on what kind of script and how do I go about doing that?

 

Thanks,

Srinath

 


From: Sami Tikka [mailto:[hidden email]]
Sent: Thursday, October 22, 2009 5:58 PM
To: [hidden email]
Subject: Re: Flexibility in the SCM polling mechanism.

 

You could set up a hook script into your SCM and disable polling. That would give you maximum flexibility to determine whoch commits should launch a build. 

 

-- Sami


On 23.10.2009, at 1.46, "Balaraman, Srinath" <[hidden email]> wrote:

Hello All,

 

I have the ability to configure multiple SCMs, but when it comes to polling, each one of the listed SCM is polled. In our setup, we don’t want to poll all the SCMs, just a few of them. Ability to configure SCM polling criteria for trigger purposes for each SCM is what I am looking for. Is there a way to do this already or would that be a feature request?

 

Thanks,

-Srinath

Sami Tikka

Re: Flexibility in the SCM polling mechanism.

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
That greatly depends on the SCM you use. I would begin by googling something like "<name of your SCM> hook", e.g. svn hook or git hook. 

-- Sami

On 23.10.2009, at 16.54, "Balaraman, Srinath" <[hidden email]> wrote:

Great! that’s interesting. Can you please give me a little bit more info on what kind of script and how do I go about doing that?

 

Thanks,

Srinath

 


From: Sami Tikka [mailto:[hidden email]]
Sent: Thursday, October 22, 2009 5:58 PM
To: [hidden email]
Subject: Re: Flexibility in the SCM polling mechanism.

 

You could set up a hook script into your SCM and disable polling. That would give you maximum flexibility to determine whoch commits should launch a build. 

 

-- Sami


On 23.10.2009, at 1.46, "Balaraman, Srinath" <[hidden email]> wrote:

Hello All,

 

I have the ability to configure multiple SCMs, but when it comes to polling, each one of the listed SCM is polled. In our setup, we don’t want to poll all the SCMs, just a few of them. Ability to configure SCM polling criteria for trigger purposes for each SCM is what I am looking for. Is there a way to do this already or would that be a feature request?

 

Thanks,

-Srinath

bsrinath

RE: Re: Flexibility in the SCM polling mechanism.

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

I am using SVN and sounds like I’ll have to use post-commit.tmpl and modify it to disable polling on a repository. But from here I don’t know what kind of script do I have to write do that. Is there something out there already that I can use?

 

Thanks,

Srinath

 


From: Sami Tikka [mailto:[hidden email]]
Sent: Friday, October 23, 2009 1:50 PM
To: [hidden email]
Subject: Re: Flexibility in the SCM polling mechanism.

 

That greatly depends on the SCM you use. I would begin by googling something like "<name of your SCM> hook", e.g. svn hook or git hook. 

-- Sami


On 23.10.2009, at 16.54, "Balaraman, Srinath" <[hidden email]> wrote:

Great! that’s interesting. Can you please give me a little bit more info on what kind of script and how do I go about doing that?

 

Thanks,

Srinath

 


From: Sami Tikka [mailto:[hidden email]]
Sent: Thursday, October 22, 2009 5:58 PM
To: [hidden email]
Subject: Re: Flexibility in the SCM polling mechanism.

 

You could set up a hook script into your SCM and disable polling. That would give you maximum flexibility to determine whoch commits should launch a build. 

 

-- Sami


On 23.10.2009, at 1.46, "Balaraman, Srinath" <[hidden email][hidden email]> wrote:

Hello All,

 

I have the ability to configure multiple SCMs, but when it comes to polling, each one of the listed SCM is polled. In our setup, we don’t want to poll all the SCMs, just a few of them. Ability to configure SCM polling criteria for trigger purposes for each SCM is what I am looking for. Is there a way to do this already or would that be a feature request?

 

Thanks,

-Srinath

bsrinath

RE: Re: Flexibility in the SCM polling mechanism.

Reply Threaded More More options
Print post
Permalink
In reply to this post by Sami Tikka
Some javascript/style in this post has been disabled (why?)

Sami,

 

I am re-reading you message “set up a hook script into your SCM and disable polling”. Do you mean: “disable Polling from Hudson” OR “write a hook-up script to disable polling”?

 

Thanks,

Srinath

 


From: Balaraman, Srinath
Sent: Friday, October 23, 2009 2:15 PM
To: '[hidden email]'
Subject: RE: Re: Flexibility in the SCM polling mechanism.

 

I am using SVN and sounds like I’ll have to use post-commit.tmpl and modify it to disable polling on a repository. But from here I don’t know what kind of script do I have to write do that. Is there something out there already that I can use?

 

Thanks,

Srinath

 


From: Sami Tikka [mailto:[hidden email]]
Sent: Friday, October 23, 2009 1:50 PM
To: [hidden email]
Subject: Re: Flexibility in the SCM polling mechanism.

 

That greatly depends on the SCM you use. I would begin by googling something like "<name of your SCM> hook", e.g. svn hook or git hook. 

-- Sami


On 23.10.2009, at 16.54, "Balaraman, Srinath" <[hidden email]> wrote:

Great! that’s interesting. Can you please give me a little bit more info on what kind of script and how do I go about doing that?

 

Thanks,

Srinath

 


From: Sami Tikka [mailto:[hidden email]]
Sent: Thursday, October 22, 2009 5:58 PM
To: [hidden email]
Subject: Re: Flexibility in the SCM polling mechanism.

 

You could set up a hook script into your SCM and disable polling. That would give you maximum flexibility to determine whoch commits should launch a build. 

 

-- Sami


On 23.10.2009, at 1.46, "Balaraman, Srinath" <[hidden email][hidden email]> wrote:

Hello All,

 

I have the ability to configure multiple SCMs, but when it comes to polling, each one of the listed SCM is polled. In our setup, we don’t want to poll all the SCMs, just a few of them. Ability to configure SCM polling criteria for trigger purposes for each SCM is what I am looking for. Is there a way to do this already or would that be a feature request?

 

Thanks,

-Srinath

Andrew Chandler

RE: Re: Flexibility in the SCM polling mechanism.

Reply Threaded More More options
Print post
Permalink
In reply to this post by bsrinath
Some javascript/style in this post has been disabled (why?)
You don't so much use the "script" to disable polling - I think thats just  a minor confusion.   What you do is


1: In hudson disable polling for the job
2: register a post-commit script on your source control box.
    2a - on a commit the script should use wget or some other command line program that is capable of hitting a http url - hudson has a way to trigger builds just by hitting a url with the right optional parameters (you'll have to lookup or ask about the exact syntax)



So to test it you would first get your little command line utility (such as "wget") and just in a console on your source control machine enter the command line you think will trigger the build i.e. something like "wget http://hudsonbuild.acme.com/somejob?builditnow"

keep in mind the url I just typed is totally nonsensical, again you need to lookup the correct syntax for specifying the job and the parameter to trigger the build but its at least in the right ballpark as concepts go.

Once you can do it by hand on the commandline you put that command into your post-commit script so that when svn gets a checkin it turns around and hits hudson with a http request that in turn starts your build.


Hope this helps.   Others will clarify what I've messed up I'm sure :)



On Fri, 2009-10-23 at 13:14 -0600, Balaraman, Srinath wrote:
I am using SVN and sounds like I’ll have to use post-commit.tmpl and modify it to disable polling on a repository. But from here I don’t know what kind of script do I have to write do that. Is there something out there already that I can use?

 

Thanks,

Srinath

 


From: Sami Tikka [mailto:[hidden email]]
Sent: Friday, October 23, 2009 1:50 PM
To: [hidden email]
Subject: Re: Flexibility in the SCM polling mechanism.


 

That greatly depends on the SCM you use. I would begin by googling something like "<name of your SCM> hook", e.g. svn hook or git hook. 

-- Sami



On 23.10.2009, at 16.54, "Balaraman, Srinath" <[hidden email]> wrote:


Great! that’s interesting. Can you please give me a little bit more info on what kind of script and how do I go about doing that?

 

Thanks,

Srinath

 


From: Sami Tikka [mailto:[hidden email]]
Sent: Thursday, October 22, 2009 5:58 PM
To: [hidden email]
Subject: Re: Flexibility in the SCM polling mechanism.


 

You could set up a hook script into your SCM and disable polling. That would give you maximum flexibility to determine whoch commits should launch a build. 

 


-- Sami



On 23.10.2009, at 1.46, "Balaraman, Srinath" <[hidden email]> wrote:


Hello All,

 

I have the ability to configure multiple SCMs, but when it comes to polling, each one of the listed SCM is polled. In our setup, we don’t want to poll all the SCMs, just a few of them. Ability to configure SCM polling criteria for trigger purposes for each SCM is what I am looking for. Is there a way to do this already or would that be a feature request?

 

Thanks,

-Srinath



--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Sami Tikka

Re: Re: Flexibility in the SCM polling mechanism.

Reply Threaded More More options
Print post
Permalink
In reply to this post by bsrinath
Let's put it this way:

If you:

- place a file called "post-commit" into the "hooks" directory of your
Subversion repository and
- in the file you put the following lines:

--- post-commit ---
#!/bin/sh
wget -O - http://YOURHUDSON/job/YOURJOB/build
--- post-commit ---

- and make that file executable,

then you can disable polling from Hudson because the hook script will
tell Hudson to build whenever a commit is made.

If you do not want to start a build on every commit but only for those
commits that change a certain part of the source tree, you can change
the post-commit script to inspect the commit before deciding if a new
build needs to be started. I myself do not know how that is done, I do
not use subversion that much.

Good luck,

-- Sami

2009/10/23 Balaraman, Srinath <[hidden email]>:

> Sami,
>
>
>
> I am re-reading you message “set up a hook script into your SCM and disable
> polling”. Do you mean: “disable Polling from Hudson” OR “write a hook-up
> script to disable polling”?
>
>
>
> Thanks,
>
> Srinath
>
>
>
> ________________________________
>
> From: Balaraman, Srinath
> Sent: Friday, October 23, 2009 2:15 PM
>
> To: '[hidden email]'
> Subject: RE: Re: Flexibility in the SCM polling mechanism.
>
>
>
> I am using SVN and sounds like I’ll have to use post-commit.tmpl and modify
> it to disable polling on a repository. But from here I don’t know what kind
> of script do I have to write do that. Is there something out there already
> that I can use?
>
>
>
> Thanks,
>
> Srinath
>
>
>
> ________________________________
>
> From: Sami Tikka [mailto:[hidden email]]
> Sent: Friday, October 23, 2009 1:50 PM
>
> To: [hidden email]
> Subject: Re: Flexibility in the SCM polling mechanism.
>
>
>
> That greatly depends on the SCM you use. I would begin by googling something
> like "<name of your SCM> hook", e.g. svn hook or git hook.
>
> -- Sami
>
> On 23.10.2009, at 16.54, "Balaraman, Srinath" <[hidden email]>
> wrote:
>
> Great! that’s interesting. Can you please give me a little bit more info on
> what kind of script and how do I go about doing that?
>
>
>
> Thanks,
>
> Srinath
>
>
>
> ________________________________
>
> From: Sami Tikka [mailto:[hidden email]]
> Sent: Thursday, October 22, 2009 5:58 PM
> To: [hidden email]
> Subject: Re: Flexibility in the SCM polling mechanism.
>
>
>
> You could set up a hook script into your SCM and disable polling. That would
> give you maximum flexibility to determine whoch commits should launch a
> build.
>
>
>
> -- Sami
>
> On 23.10.2009, at 1.46, "Balaraman, Srinath" <[hidden email]>
> wrote:
>
> Hello All,
>
>
>
> I have the ability to configure multiple SCMs, but when it comes to polling,
> each one of the listed SCM is polled. In our setup, we don’t want to poll
> all the SCMs, just a few of them. Ability to configure SCM polling criteria
> for trigger purposes for each SCM is what I am looking for. Is there a way
> to do this already or would that be a feature request?
>
>
>
> Thanks,
>
> -Srinath

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

Dean Yu

Re: Flexibility in the SCM polling mechanism.

Reply Threaded More More options
Print post
Permalink
http://wiki.hudson-ci.org/display/HUDSON/Subversion+Plugin


On 10/23/09 1:56 PM, "Sami Tikka" <[hidden email]> wrote:

> Let's put it this way:
>
> If you:
>
> - place a file called "post-commit" into the "hooks" directory of your
> Subversion repository and
> - in the file you put the following lines:
>
> --- post-commit ---
> #!/bin/sh
> wget -O - http://YOURHUDSON/job/YOURJOB/build
> --- post-commit ---
>
> - and make that file executable,
>
> then you can disable polling from Hudson because the hook script will
> tell Hudson to build whenever a commit is made.
>
> If you do not want to start a build on every commit but only for those
> commits that change a certain part of the source tree, you can change
> the post-commit script to inspect the commit before deciding if a new
> build needs to be started. I myself do not know how that is done, I do
> not use subversion that much.
>
> Good luck,
>
> -- Sami
>
> 2009/10/23 Balaraman, Srinath <[hidden email]>:
>> Sami,
>>
>>
>>
>> I am re-reading you message ³set up a hook script into your SCM and disable
>> polling². Do you mean: ³disable Polling from Hudson² OR ³write a hook-up
>> script to disable polling²?
>>
>>
>>
>> Thanks,
>>
>> Srinath
>>
>>
>>
>> ________________________________
>>
>> From: Balaraman, Srinath
>> Sent: Friday, October 23, 2009 2:15 PM
>>
>> To: '[hidden email]'
>> Subject: RE: Re: Flexibility in the SCM polling mechanism.
>>
>>
>>
>> I am using SVN and sounds like I¹ll have to use post-commit.tmpl and modify
>> it to disable polling on a repository. But from here I don¹t know what kind
>> of script do I have to write do that. Is there something out there already
>> that I can use?
>>
>>
>>
>> Thanks,
>>
>> Srinath
>>
>>
>>
>> ________________________________
>>
>> From: Sami Tikka [mailto:[hidden email]]
>> Sent: Friday, October 23, 2009 1:50 PM
>>
>> To: [hidden email]
>> Subject: Re: Flexibility in the SCM polling mechanism.
>>
>>
>>
>> That greatly depends on the SCM you use. I would begin by googling something
>> like "<name of your SCM> hook", e.g. svn hook or git hook.
>>
>> -- Sami
>>
>> On 23.10.2009, at 16.54, "Balaraman, Srinath" <[hidden email]>
>> wrote:
>>
>> Great! that¹s interesting. Can you please give me a little bit more info on
>> what kind of script and how do I go about doing that?
>>
>>
>>
>> Thanks,
>>
>> Srinath
>>
>>
>>
>> ________________________________
>>
>> From: Sami Tikka [mailto:[hidden email]]
>> Sent: Thursday, October 22, 2009 5:58 PM
>> To: [hidden email]
>> Subject: Re: Flexibility in the SCM polling mechanism.
>>
>>
>>
>> You could set up a hook script into your SCM and disable polling. That would
>> give you maximum flexibility to determine whoch commits should launch a
>> build.
>>
>>
>>
>> -- Sami
>>
>> On 23.10.2009, at 1.46, "Balaraman, Srinath" <[hidden email]>
>> wrote:
>>
>> Hello All,
>>
>>
>>
>> I have the ability to configure multiple SCMs, but when it comes to polling,
>> each one of the listed SCM is polled. In our setup, we don¹t want to poll
>> all the SCMs, just a few of them. Ability to configure SCM polling criteria
>> for trigger purposes for each SCM is what I am looking for. Is there a way
>> to do this already or would that be a feature request?
>>
>>
>>
>> Thanks,
>>
>> -Srinath
>
> ---------------------------------------------------------------------
> 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]

Sami Tikka

Re: Flexibility in the SCM polling mechanism.

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
The page says:

Jobs on Hudson need to be configured with the SCM polling option to benefit from this behavior (this is so that you can have jobs that are never triggered automatically, such as some release related tasks.) The net effect is as if polling happens out of their usual cycles.

----

I don't understand why a job using hook to trigger it still needs polling. We seem to manage with no polling. 

-- Sami

On 24.10.2009, at 0.28, Dean Yu <[hidden email]> wrote:

http://wiki.hudson-ci.org/display/HUDSON/Subversion+Plugin


On 10/23/09 1:56 PM, "Sami Tikka" <[hidden email]> wrote:

Let's put it this way:

If you:

- place a file called "post-commit" into the "hooks" directory of your
Subversion repository and
- in the file you put the following lines:

--- post-commit ---
#!/bin/sh
wget -O - http://YOURHUDSON/job/YOURJOB/build
--- post-commit ---

- and make that file executable,

then you can disable polling from Hudson because the hook script will
tell Hudson to build whenever a commit is made.

If you do not want to start a build on every commit but only for those
commits that change a certain part of the source tree, you can change
the post-commit script to inspect the commit before deciding if a new
build needs to be started. I myself do not know how that is done, I do
not use subversion that much.

Good luck,

-- Sami

2009/10/23 Balaraman, Srinath <[hidden email]>:
Sami,



I am re-reading you message “set up a hook script into your SCM and disable
polling”. Do you mean: “disable Polling from Hudson” OR “write a hook-up
script to disable polling”?



Thanks,

Srinath



________________________________

From: Balaraman, Srinath
Sent: Friday, October 23, 2009 2:15 PM

To: [hidden email]'
Subject: RE: Re: Flexibility in the SCM polling mechanism.



I am using SVN and sounds like I’ll have to use post-commit.tmpl and modify
it to disable polling on a repository. But from here I don’t know what kind
of script do I have to write do that. Is there something out there already
that I can use?



Thanks,

Srinath



________________________________

From: Sami Tikka [mailto:[hidden email]]
Sent: Friday, October 23, 2009 1:50 PM

To: [hidden email]
Subject: Re: Flexibility in the SCM polling mechanism.



That greatly depends on the SCM you use. I would begin by googling something
like "<name of your SCM> hook", e.g. svn hook or git hook.

-- Sami

On 23.10.2009, at 16.54, "Balaraman, Srinath" <[hidden email]>
wrote:

Great! that’s interesting. Can you please give me a little bit more info on
what kind of script and how do I go about doing that?



Thanks,

Srinath



________________________________

From: Sami Tikka [mailto:[hidden email]]
Sent: Thursday, October 22, 2009 5:58 PM
To: [hidden email]
Subject: Re: Flexibility in the SCM polling mechanism.



You could set up a hook script into your SCM and disable polling. That would
give you maximum flexibility to determine whoch commits should launch a
build.



-- Sami

On 23.10.2009, at 1.46, "Balaraman, Srinath" <[hidden email]>
wrote:

Hello All,



I have the ability to configure multiple SCMs, but when it comes to polling,
each one of the listed SCM is polled. In our setup, we don’t want to poll
all the SCMs, just a few of them. Ability to configure SCM polling criteria
for trigger purposes for each SCM is what I am looking for. Is there a way
to do this already or would that be a feature request?



Thanks,

-Srinath

---------------------------------------------------------------------
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]

Thomas Sondergaard-2

Re: Flexibility in the SCM polling mechanism.

Reply Threaded More More options
Print post
Permalink
In reply to this post by Sami Tikka
On 2009-10-23 22:56, Sami Tikka wrote:

>
> If you do not want to start a build on every commit but only for those
> commits that change a certain part of the source tree, you can change
> the post-commit script to inspect the commit before deciding if a new
> build needs to be started. I myself do not know how that is done, I do
> not use subversion that much.

Would it be difficult to add support for configuring jobs to poll for
changes when an URL like the following is hit

wget -O - http://YOURHUDSON/poll_scm?scm=<scm-id>


That way you could use the simplest possible SCM hook script, reduce
load on the SCM and get builds started immediately on commit.


Regards,

Thomas Sondergaard


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