Perform sequential job tasks in multiple environments using Jenkins

I am new to Jenkins. I am trying to implement a specific scenario in one task to create mobile applications using Jenkins.

In one task, I want to run several tasks sequentially: Task 1 (Windows) ---> Task 2 (Windows) ---> Task 3 (Windows) ---> Task 4 (Mac OSX)

Each task will be dedicated to one project. Transferring results from a task to another can be implemented through the workspace, but it seems that task tasks must be performed in the same environment. Is there any plugin that will allow me to run some job tasks on a specific slave?

Thanks in advance

+5
source share
3 answers

You can use the assembly trigger remotely on your subordinate jobs. Then, from the main job, you can perform slave assemblies using curl. Like this:

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

TheSecretToken is the token specified by you in your subordinate plugins. And username: the password is a valid user on your jenkins. Do not use your own account here, but rather a "build trigger" account, which only has permissions to run certain tasks.

+4
source
  • Define a task for each task you specify.

  • You have a slave device on remote computers - presumably on a Mac.

  • In each task, set the appropriate host that will run it (you have an option for this).

  • Use the plugin with the trigger parameterized build parameter to run the tasks in the correct sequence and make sure that you pass the Current build parameters in this section.

  • This plugin will allow you to pass other values ​​as well - read its help for more details.

+1
source
0
source

All Articles