Running sequentially job tasks on several environments using Jenkins

jenkins, jenkins-plugins

Solution

You could use trigger builds remotely on your slave jobs. Then from the master job you can execute slave builds using curl. Like this:

$(curl --user "username:password" "http://jenkins.yourdomain.org/job/JOB-name/buildWithParameters?SOMEPARAMETER=$SOMEPARAMETER&token=TheSecretToken")

TheSecretToken is the token password you specified on your slave plugins. And username:password is a valid user on your jenkins. Don't use your own account here but rather a 'build trigger' account that only has permissions to start specific jobs.

Problem

I'm new to Jenkins. I'm trying to implement a specific scenario in a single job to build mobile applications using Jenkins. In a single job I want to launch several tasks sequentially: Task 1 (Windows) ---> Task 2 (Windows) ---> Task 3 (Windows) ---> Task 4 (Mac OSX) Each job will be dedicated to a single project. Passing results from a task to another can be realised through the workspace, but it seems that job tasks must all run on the same environment. Is there any plugin that will let me run some tasks of the job in a particular slave ? Thanks in advance

Original source