Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the correct syntax for labels for slave Jenkins node

Tags:

jenkins

I am configuring slave Linux node in Jenkins. What is the correct syntax (separator and escaping) for multiple labels here?

enter image description here

like image 591
madhead - StandWithUkraine Avatar asked Apr 20 '16 10:04

madhead - StandWithUkraine


People also ask

What is Jenkins node label?

When creating a new slave node, Jenkins allows us to tag a slave node with a label. Labels represent a way of naming one or more slaves. We leverage this labeling system to tie the execution of a job directly to one or more slave nodes.

What will the below mentioned syntax do while running a Jenkins Pipeline agent label slave?

It will execute the pipeline on Jenkins master node.

What is Jenkins slave node?

A Slave is a Java executable that runs on a remote machine. Following are the characteristics of Jenkins Slaves: It hears requests from the Jenkins Master instance. Slaves can run on a variety of operating systems.


1 Answers

You should separate labels with whitespaces. If a label contains a space you should quote it (single and double quotes are ok): E.g slave 'single quotes' "double quotes" "1970's" '1980\'s' results in these set of labels:

enter image description here

like image 114
madhead - StandWithUkraine Avatar answered Oct 01 '22 03:10

madhead - StandWithUkraine