I do not want to allow two jobs of the same type (same repository) to run in parallel on the same node.
How can I do this using groovy inside Jenkinsfile ?
Example using options block in the declarative pipeline syntax:
pipeline { options { disableConcurrentBuilds() } ... }