> > This seems to be the only way that I can get it working but it requires >> repeating the pipeline twice which in my case is a complicated one: >> > def call(String buildType, String agentLabel=null) { if ("versionBranch".equals(buildType)) { if (agentLabel==null) { pipeline { agent any ... rest of the pipeline } } else { pipeline { agent {label "${agentLabel}"} ... rest of the pipeline } } } }
Is there another way? -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e704849f-f935-49a2-b320-d158f7764736%40googlegroups.com.