tags:

views:

756

answers:

1

Hello I wanted to know if there is a way that hudson will start a build and stop it if nothing was changed? because i have a script after the build wich i dont want to run if nothing has changed from least build(only if someone checked in a file for example). Thanks Gil.

+3  A: 

In a job configuration, you can select the type of trigger that will start the build. Among them, you can:

  • ask Hudson to build periodically (for example every hour, every night...), even if no changes have been commited. This is the option Build periodically.
  • ask Hudson to check periodically the CVS/SVN/..., and if there are changes since the last build, then it will start the build. This is the option Pool SCM

The second option is what you are looking for, I suppose...

Edit, regarding the comments...

ClearCase is not supported natively by Hudson. A plugin is therefore needed to use the ClearCase SCM. However, it seems that this plugin does not track - yet - properly the SCM changes of a project, as stated in their todo list:

Add ability to perform difference report between any two builds using baseline

I'm not sure if this is directly related to your problem, but I think that the best solution is to contact the plugin developers team and eventually to create an issue in the Hudson's JIRA system...

romaintaz
yes the second option is what i need but still i configured it to check every minute,then i changed a file and checked it in at clearcase,still it did not discover any change!?maybe i dont know how to use this option...
ClearCase is not supported natively by Hudson. A plugin is needed. Maybe something is not correct in this plugin, that's why Hudson does not behave as expected.In the ClearCase plugin page, I see, in the Todolist "Add ability to perform difference report between any two builds using baseline". Maybe this explains why Hudson fails to track changes in your project...
romaintaz
i have the clear case plugin installed,iv'e did some builds and when i checked in i could see the update in the build,but this option of poll scm ignore this changes,btw i don't change baselines, i just want it to build after a developer checked in a file...
BTW Thanks alot for the help and wuick response.
Please mark this question as answered if your question is cleared.
bastianneu
its not clear yet :-)

related questions