Defining Pipeline nodes
In the Jenkins Pipeline DSL, a node is a step that does two things, typically by enlisting help from available executors on agents.
A node schedules the steps contained within it by adding them to the Jenkins build queue. That way, as soon as an executor slot is free on a node, the appropriate steps will be run.
It also creates a workspace, meaning a file directory specific to a particular job, where resource-intensive processing can occur without negatively impacting your Pipeline performance. Workspaces created by a node are automatically removed after all the steps contained inside the node declaration finish executing. It is a best practice to do all material work, such as building or running shell scripts, within ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access