But how do you guarantee that the second job runs on the same slave as the
first, unless you pin both jobs to a single slave?
On May 3, 2013 12:12 AM, "Martin Ba" <[email protected]> wrote:
> On 03.05.2013 03:36, Eric Blom wrote:
>
>> Hello Everyone,
>>
>> We started using Jenkins about a year ago and have been very happy with
>> it. We keep finding more way to use it! Some of our jobs use hardware
>> connected to the slave and when that slave job is canceled we need to
>> execute a clean up step, how can this be done?
>>
>> I'm looking for a solution for both Linux and Windows. On Linux I've
>> tried using the trap command, but, I can't find any signal that trap can
>> trap. On windows I haven't found any solution yet.
>>
>> ...
>> Can anyone offer me some advice on how to implement a clean up on cancel
>> for Linux and Windows?
>>
>>
> Idea: Move the cleanup to a second job that you run downstream from the
> first one. You start the second job always ("Complete (always trigger)")
> and it will run even when the first job was aborted.
>
> And if you use the parameterized trigger plugin and load the parameters
> for job#2 from a file, you can have it starting depend on the file
> existing. ("Don't trigger if any files are missing.")
>
> cheers,
> Martin
>
> --
> 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
> jenkinsci-users+unsubscribe@**googlegroups.com<jenkinsci-users%[email protected]>
> .
> For more options, visit
> https://groups.google.com/**groups/opt_out<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.