Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use WSL2 as a Jenkins agent machine from Jenkins on Windows 10?

Is it possible to use WSL2 as an agent for Jenkins installed in Windows 10 x64?

like image 719
Farrukh Waheed Avatar asked Aug 31 '25 01:08

Farrukh Waheed


1 Answers

As long as you can SSH to your WSL2 instance, using for instance Scott Hanselman's script described in his blog post, that means your Jenkins main controller can contact the WSL2 instance through SSH.

https://www.jenkins.io/doc/book/resources/node/node-2.png

The alternative would be to use an agent with Docker.
Both methods are described in Jenkins documentation Using agents.

like image 170
VonC Avatar answered Sep 05 '25 03:09

VonC