I have a case where I have 5 executers on a slave and 2 jobs running on that slave. Jobs are triggered by a pipeline. Multiple instance of the same job will be triggered with different parameters. Consider I have Job A and Job B
I have 10 instance of Job A is in queue. At that time one instance of Job B is getting to the queue as 11th in the queue.
If I need Job B to be executed as 1st in the queue, what can I do.
So, I need Job B should be prioritized over Job A.
You can use the Priority sorter plugin and set the priority of Job B to be higher than the priority of Job A. You could also use the accelerated build now plugin to manually run job B ahead of the rest of the queue. This will kill all the jobs waiting in the queue, start the new job, then reschedule all the other jobs behind it.