Jenkins running slaves via environment requirements

0 votes
Hello everyone ! i want to set jenkins to launch the build in the slave who have the best environment requirements
for example i have slave 1 with jdk 7 and the slave 2 with jdk 8 and my job runs on jdk 8 i want jenkins while building my job executes the slave 2 automatically because it has jdk 8 .
Feb 28 in Jenkins by Yassine
• 180 points
131 views

1 answer to this question.

0 votes

Hi@Yassine,

You can do this I guess. Go to nodes and check the configuration of node which have jdk 8 installed. There you can find one field named Usage, set that field as Use this node as much as possible.

Go to other nodes and set that same field with Only build jobs with label expressions matching this node.

You can do this similar kind of thing by creating user in nodes and assign jobs to that particular user. If you created user in your preferred jdk 8 machine, than the job will run on that particular machine.

You can go through the below link. It may help.

https://www.edureka.co/community/47822/there-restrict-permissions-user-per-individual-job-jenkins?show=64184#c64184

Thank You

answered Mar 2 by MD
• 57,960 points
is there any method where i can assign for each node his capabilities and for each job his requirements and then when i start building any job jenkins chooses the node with the capabilities which matches my job's requirements automatically ?
I don't think so you can do that. Let's say you have a multi node cluster in jenkins. If you want to dedicate any job in a node, you can do that. But if you run any job, jenkins internally selects one of your node which matches the job requirement and run that job.

Related Questions In Jenkins

0 votes
1 answer

running a Jenkins job on multiple virtual servers.

Your goals can be achieved by using ...READ MORE

answered May 25, 2018 in Jenkins by shubham
• 6,910 points
781 views
0 votes
2 answers

will running multiple Jenkins masters on same host increase the performance?

While using one big master, u can ...READ MORE

answered Aug 7, 2018 in Jenkins by Kalgi
• 51,950 points
1,518 views
0 votes
1 answer

running gunicorn bind command in Jenkins background?

If you're getting a 502 error that ...READ MORE

answered Jun 26, 2018 in Jenkins by DareDev
• 6,850 points
684 views
+2 votes
3 answers

Permission denied error while running a simple job in Jenkins

Hey @Hannah, try changing the permissions using ...READ MORE

answered Oct 25, 2018 in Jenkins by krishti
21,468 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
685 views
+2 votes
1 answer
0 votes
1 answer

not able to launch new node via SSH in Jenkins!

Hi@akhtar, To launch one new node via SSH, ...READ MORE

answered May 29 in Jenkins by MD
• 57,960 points
81 views
0 votes
1 answer

How to install jenkins in Redhat/CentOS?

Hi@akhtar, To install Jenkins in centOS/Redhat, you can ...READ MORE

answered Feb 6 in Jenkins by MD
• 57,960 points
193 views