Jenkins Agent
A Jenkins agent, also referred to as a Jenkins slave, is a worker machine, or container, that connects to a Jenkins controller and executes tasks when directed by the controller. The agent section specifies where the entire pipeline or specific stage will execute in the Jenkins environment, depending on where the agent is placed. Agents are used to offload tasks from the Jenkins master; this makes possible parallel execution of jobs and scalability of the Jenkins infrastructure.
Example: You can think of Jenkins agents as specialized workers in a factory. In the factory, there is a control room (Jenkins Master) where production schedules are managed. When there is a need to assemble a product( run a building job), the control room assigns tasks to workers (agents) who may be working in different locations. Each worker executes their tasks independently, which allows multiple products to be assembled simultaneously.
Difference Between Jenkins Agent And Node
Jenkins is a popular open-source tool to perform continuous integration and build automation. Jenkins has established itself as a go-to tool for automating the development process. Jenkins can distribute tasks across multiple machines or environments, which are often referred to as agents or nodes. While we sometimes use these terms interchangeably, they serve distinct purposes in the Jenkins ecosystem. In this article, we will be exploring the differences between Jenkins Agent and Node.