You can poll for the existence of a file with the xtrigger plugin but
if one minute  isn't satisfactory then you could move the polling into
a job that is always running and doesn't return until the file
exists.  Then your script in ftpd creates this trigger file when it
wants the job to be done.
That's one way to do it, there may be others.

On May 11, 11:59 am, "Chris Platts" <chris.pla...@ocs.co.uk> wrote:
> Hi all,
>
> We've been really successful with using Jenkins to manage our software
> development.  Now, I'm working on pulling all of our 'batch jobs' - FTP
> transfers, etc - into Jenkins so that we've got a consistent interface
> via which jobs can be monitored.
>
> We have a Linux system sat in a DMZ which handles all of our external
> transfers (pulling files via (S)FTP as well as running its own (S)FTP
> servers).  This is configured as a slave in Jenkins.  The Jenkins server
> itself sits inside our corporate network - the DMZ firewall allows SSH
> through so that the slave can operate.
>
> One of the things I'd like to achieve is to have Jenkins jobs triggered
> by our FTP server.  We're using proftpd which features a module
> (mod_exec) which can execute scripts at various points - e.g. when an
> FTP user disconnects.
>
> Ideally, I'd like the disconnection of a user to trigger a Jenkins job
> so that Jenkins can then a) pull the FTP log to record what happened
> during the transfer and b) kick off other tasks to handle the received
> files (if any).  However, the firewall doesn't allow any comms back from
> the DMZ, so proftpd scripts on the linux box cannot contact the Jenkins
> host.
>
> Is there any way that a script can instruct the slave process to talk to
> the Jenkins host via the already-established SSH link so that a job
> could be triggered?
>
> (Incidentally, I know the obvious question - why do the jobs need to be
> triggered from the slave side rather than just have Jenkins run on a
> schedule?  The problem is that we need these tasks to be triggered
> immediately on receipt of files, rather than on an scheduled interval.
> Unfortunate, I know!)
>
> Thanks for any help,
>
> Chris
>
>  OCS  CATERING  I CLEANING  I ENGINEERING  I HORTICULTURE  I HYGIENE I 
> INTEGRATED_SERVICES  I PEST_CONTROL  I RETAIL_SUPPORT  I SECURITY  I 
> WASTE_MANAGEMENT
> MEMBER OF
> EUROLIANCE
>
> OCS Group UK Limited.  Registered in England No. 3056469  Registered Office: 
> Tilgate Forest Business Park, Brighton Road, Crawley, RH11 9BPwww.ocs.co.uk
> This communication contains information which is confidential and may also be 
> privileged. It is for the exclusive use of the addressee. If you are not the 
> addressee, please note that any distribution, dissemination, copying or use 
> of this communication or the information in it is prohibited. If you have 
> received this message in error, please notify the sender immediately at the 
> above e-mail address or telephone number and delete the information from your 
> computer system.  Attachments are virus checked, but the company does not 
> accept any liability in respect of any virus which is not detected.
>
> v.04ii10
>
>  image_jpeg_part
> 92KViewDownload

Reply via email to