As a user, I want to run multiple stages inside a single agent. Today we use the mesos plugin and spin up and spin down an agent on demand. I want to have 3 stages all run on that same agent before it spins down. That way all stages can leverage that workspace before it is trashed.
Current ability in script syntax: node('java-1.8.0_45') { stage ('Build') { checkout scm // do some build stuff } stage ('Submit to Sonar') { // do some mvn stuff to submit to sonar } stage ('Submit for OSS Scanning'){ // do some work for uploading to OSS scanning system } } All of this happens on the node and I see it as 3 stages on my pipeline. With Declarative: stages { stage ('Build and Scan') { agent { label "java-1.8.0_45" } steps { checkout scm // do some build stuff // do some scan stuff // do some oss scan stuff } } I no longer can specify them to all happen in the same node unless I do this above, which then I can no longer define the stages. Is there something I'm missing here? Keep in mind the important part that the node is spun up and trashed on every invocation so we can't just get ahold of the previous/same agent again. Thanks, Ken -- 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/bba6cb94-f39c-4923-a400-027fb36a043f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.