Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Jenkins job immediately

Tags:

jenkins

I have a very lightweight job that should be executed immediately when it is triggered, rather than waiting an hours for current jobs to finish.

As I understand, a flyweight task is what I want. It will create a ephemeral executor, just for that task.

How can I make a job be run as flyweight?

like image 854
Paul Draper Avatar asked Apr 13 '15 23:04

Paul Draper


1 Answers

I have recently had the same problem. My company has a lot of jenkins projects and some have more precedence over others, and we limit the number of executors to only 4.

Therefore, we decided to create some slaves, instead of always building on the master. Create a slave node that only builds your "very lightweight job".

Go to Manage Jenkin -> Manage nodes -> New node -> Dumb slave.

Then configure your slave node to your liking. Now configure the "very lightweight job". Make sure that This build is parameter is checked, then Add parameter -> Node.

Then select the slave node that you just created. There are a lot of configurations, such as which node do you want to default, but I think you can customize that to your liking.

like image 98
Shengqi Wang Avatar answered Oct 17 '22 21:10

Shengqi Wang