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 29, 2020 in Jenkins by Yassine
• 180 points
731 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, 2020 by MD
• 95,440 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
• 7,340 points
2,801 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
• 52,360 points
3,025 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,890 points
1,795 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
56,497 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,520 views
+2 votes
1 answer
+3 votes
12 answers

Set environment variables in Jenkins

You can try something like this stages { ...READ MORE

answered Dec 10, 2018 in Jenkins by Celia
107,784 views
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, 2020 in Jenkins by MD
• 95,440 points
3,327 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP