Gregory,

The script trigger does not allow me to implement the changelog feature
that an SCM plugin would provide. moreover the script trigger runs even
while a build is running. An SCM plugin has a feature to stop polling if a
build is running and resume polling only after the build completes. the
script scm plugin provides the ability to interface with ant scripts and
batch scripts as well.

The script scm plugin also solves a common issue. A common build setup is
to have builds run when changes  are detected, and also have one nightly
build that runs with sonar enabled. The most common solution is  to have
two projects defined in jenkins, one with sonar disabled and another with
sonar enabled. The problem with this approach is two projects needs to be
maintained in Jenkins for just one actual project which can become
cumbersome. With the script scm plugin it is possible to use scripts to
determine if a sonar build needs to be run or not, only one project needs
to be maintained.

Another useful scenario I see that can be implemented with the script scm
plugin is to run a build with different parameters or not at all  based on
the type of changes detected. For example if only sql changes were detected
then  the script scm plugin can be made to set a parameter that indicates
only the database scripts have to be executed and no compilation of source
files is required, or maybe if only text files within the project are
modified then build should be skipped entirely.

I think it is possible but difficult to use the script trigger plugin to
implement the above two features, because these features require the
ability to access attributes from jenkins api objects and pass them to an
external script that can communicate  with the SCM. If I understand
correctly the trigger plugin allows either a groovy script to be used or a
batch script to be used but not both. the problem is it becomes difficult
to pass values from Jenkins objects to the batch script. For example if I
want to write code in groovy that iterates through the previous builds,
look for some specific value and then pass the id of the build that has the
value to a batch script.

Andrew suggested that I integrate this plugin with the script trigger
plugin but I am not sure how I can do this as these are two different
extension points provided by jenkins. The trivial solution i see is to make
the plugin provide the scm feature and the trigger feature independently,
but this would be like clubbing two different features under one plugin.


On Mon, Feb 6, 2012 at 9:04 AM, Grégory Boissinot <
[email protected]> wrote:

> The scriptTrigger plugin (
> https://wiki.jenkins-ci.org/display/JENKINS/ScriptTrigger+Plugin) meets
> your need.
> You can detect changes by a script (a shell script or a groovy script).
>
>
> On Wed, Feb 1, 2012 at 1:52 AM, vimil saju <[email protected]> wrote:
>
>> Hi,
>>
>> I have created a new SCM plugin that uses a groovy script to detect
>> changes and start a build.I'd like to host this plugin on jenkins site. The
>> name of the plugin is script-scm
>>
>>
>>
>

Reply via email to