How about using the File Found Trigger and writing a dummy file on the master in a dummy folder with the java-based system and have the build poll for that file and then the first or last step of the build can delete the trigger? https://wiki.jenkins-ci.org/display/JENKINS/Files+Found+Trigger
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Les Mikesell Sent: Friday, June 15, 2012 12:05 PM To: [email protected] Subject: Re: Starting a Jenkins job from a java-based system and receiving feedback On Fri, Jun 15, 2012 at 11:14 AM, Nig <[email protected]> wrote: > Hi, > > Is it possible to kick off a Jenkins build asynchronously using > something like JMS ? > > This is because I want an in-house java-based system to tell Jenkins > to start a job and not have to wait until the job completes. > > I am currently using the Jenkins Java API to kick off a job using the > Java CLI class but the problem is my code has to wait for the job to complete. > > It would be better to just send a command in the form of a JMS message > so that my code will not have to wait for job completion. > > The java-based system would then need to be able to receive feedback (e.g. > job success, job failure with details). The obvious thing is to hit the rest interface, but if you want the two things to be almost completely unaware of each other, the other system could commit something to an SCM like subversion where jenkins is polling for changes. The thing it commits might or might not actually be used to control changes in the job, and this approach can work even if the systems can't connect directly or aren't online at the same times. The job itself might send completion details, or maybe you could route an email from the email-ext plugin back to your other process. -- Les Mikesell [email protected]
