Jenkins agent
There are quite a few ways to run Jenkins agents. The problem with most of them is that they force us to add agents separately through Jenkins UI. Instead of adding agents one by one, we'll try to leverage Docker Swarms ability to scale services.
One way we can accomplish the quest for making scalable agents is the Jenkins Swarm Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Swarm+Plugin). Before you start making wrong conclusions, I must state that this plugin has nothing to do with Docker Swarm. The only thing they share is the word Swarm.
The Jenkins Swarm Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Swarm+Plugin) allows us to auto-discover nearby masters and join them automatically. We'll use it only for the second feature. We'll create a Docker Swarm service that will act as a Jenkins agent and join the master automatically.
First things first. We need to install the plugin.
Please open the Plugin Manager screen as shown in the following code:
open "http://$(docker...