Hi Jason,

Thanks for this suggestion - this looks like it will work for us!

--Jim


On Tue, May 28, 2013 at 3:10 PM, Jason Swager <[email protected]> wrote:

> Your second approach - slightly modified - would work.  Create a job that
> determines if the next job should run, using whatever logic/scripts you
> want.  If you want to trigger the next job, write out a file.  Then use the
> Conditional Build Step plugin (
> https://wiki.jenkins-ci.org/display/JENKINS/Conditional+BuildStep+Plugin)
> to check for the file and if present, start the second job running using
> the the build step from the Parameterized Trigger  plugin (
> https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin).
>
> We use this particular approach very heavily in our Jenkins installation
> and it works better than relying on the other trigger types.  We can
> control the logic very tightly and with all the quirks that we want, but
> still use Jenkins to drive the overall process.
> Jason Swager
>
>
> On Tuesday, May 28, 2013 12:03:25 PM UTC-7, Jim Zajkowski wrote:
>>
>> Hi all,
>>
>> This is perhaps a bit outside the normal Jenkins setup, but I need to
>> have a job run periodically, and that job will determine whether or not
>> another job should be run.
>>
>> Right now I have this working by having the first job change a file and
>> the second job trigger via FSTrigger.
>>
>> However, this doesn't work when using different nodes, because the
>> FSTrigger monitors on the node assigned to the second job, not necessarily
>> the first job.
>>
>> All the research I've found suggests doing one of two things:
>>
>> a. Have the monitoring job return success / fail depending on whether the
>> second job should run, and use the normal downstream job mechanism.  This
>> seems less than ideal because the first job doesn't really /fail/ per se,
>> it runs and makes a decision.  To me, a failure means it couldn't make a
>> decision one way or the other.
>>
>> b. Have the monitoring job invoke the second job via remote call, e.g.,
>> with curl.  Our Jenkins installation is behind a centralized SSO system, so
>> that makes life a bit more difficult, but not impossible.
>>
>> Is there any way to perhaps have a job execute based on the output of the
>> monitoring job?  Or any other way to do this?
>>
>> --Jim
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to