Score:0

How to apply multiple labels to jenkins nodes?

cn flag

When I apply a label to Node, it is working as expected and the job able to pick this node.

But, if I apply multiple labels, it is not working. As I observe, it is taking both of them as single label.

Example: label: devbuild

It is working with the job.

But,

label: devbuild,installernode

It is not working for any of the jobs with label "devbuild" or "installernode" Even I tried with ; but same issue.

Please suggest how to apply multiple labels to single node.

ba flag
It's space separated. [Label conditions](https://www.jenkins.io/doc/book/pipeline/syntax/) can also be used. For example: `agent { label 'my-label1 && my-label2' }` or `agent { label 'my-label1 || my-label2' }`. That would be on the job side.
Score:0
jp flag

On my Jenkins instance, node labels are separated by spaces (not commas nor semicolons). So:

devbuild installernode

Should work for you.

Sara June avatar
cn flag
Yeah observed that, thank you.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.