0

In Jenkins about to define an agent is possible use either:

#1

agent {
    label 'something'
}

#2

agent {
   node {
      label 'something'
   }
}

Both work, but when is mandatory use an approach over the other?

Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
  • Should be helpful: https://stackoverflow.com/questions/42050626/jenkins-pipeline-agent-vs-node – Matthew Schuchard Oct 05 '21 at 17:03
  • 1
    @MattSchuchard No, it's not. The [docs](https://www.jenkins.io/doc/book/pipeline/syntax/#agent-parameters) are more helpful. – zett42 Oct 05 '21 at 21:32
  • 1
    @MattSchuchard thanks for the link - _it indicates 'but node allows for additional options (such as customWorkspace)'_ - I am going a research about that – Manuel Jordan Oct 05 '21 at 21:39

0 Answers0