Reputation: 565
I have following questions about Jenkins build agents:
agent any
means that "Execute the Pipeline, or stage, on any available agent" - how to check what are list of available agents and what are their capabilities (e.g. one agent can build maven, another not...)?agent { label 'docker' }
means that I will use agent called "docker" - how to find out is that agent actually exists? Where to find it?Thanks for help :)
Upvotes: 1
Views: 136
Reputation: 1469
Jenkins allows you to have multiple agents (nodes or slaves) but when you install jenkins the only agent configured is the master.
It is quite simple to configure new nodes, please refer to one of these guides:
When you are setting up a new node you can assign labels to it so that you can then use to perform specific tasks on that node from a pipeline, for example.
So answering your questions:
This setting can be done using labels.
Example: All nodes with maven have a label, eg "maven".
Then running something like agent { label 'maven' }
will only execute in one of this nodes.
You can list all available nodes and check the configurations for each one in Manage Jenkins > Manage Nodes.
Upvotes: 1