|
Answer» An agent REPRESENTS the build pipeline or highlighting specific steps where EXECUTION will be getting performed or agent location. Inside the pipeline block, an agent is available at a higher level but it is OPTIONAL to use stage-level. - The agent SECTION determines whether an entire pipeline or particular stage will be part of Jenkins environment driven by where exactly agent section is located. The agent section must be at the top-level and within pipeline block only. You can visit the below URL to get some more details on agent syntax in Jenkin pipeline. .(HTTPS://jenkins.io/doc/book/pipeline/syntax/#agent
- There are many ways to create Agent/Node but we can follow the below tutorial to know about steps to create agent/Node.https://devopscube.com/setup-slaves-on-jenkins-2/
- The different parameters are supported by Agent to support various use These parameters actually work at the top level of pipeline block or it can work under stage directive as well.
|