For JENKINS-40370, we'll be doing new syntax for when. Given certain similarities to agent, it makes sense to have a common look and feel to the two sections' syntax, and we already had an interest in making the agent syntax more flexible going forward, so let's move from

      agent label: 'foo'
      

      to

      agent {
        label 'foo'
      }
      

      We'll still support agent none and agent any, since they're useful shortcuts that we've already got special logic for.

          [JENKINS-40524] Rework agent syntax to be more extensible

          Andrew Bayer added a comment -

          Yes, validation will catch those cases.

          Andrew Bayer added a comment - Yes, validation will catch those cases.

          Fine by me. I am just worried that this section will become a hazzle to document if the agent specific options don't get split up.
          Another thing i was thinking about was this.

          agent {
            name docker
            options {
              args "-v /tmp:/tmp -p 80:80"
              label "foo"
            }
          }
          

          Peter Leibiger added a comment - Fine by me. I am just worried that this section will become a hazzle to document if the agent specific options don't get split up. Another thing i was thinking about was this. agent { name docker options { args "-v /tmp:/tmp -p 80:80" label "foo" } }

          Michael Neale added a comment -

          pleibiger yes I can see your point, however I think validation and good samples and tooling will help. Most of the time the config is quite flat and simple... so I think this will be ok.

          Michael Neale added a comment - pleibiger yes I can see your point, however I think validation and good samples and tooling will help. Most of the time the config is quite flat and simple... so I think this will be ok.

          michaelneale Sounds good.

          Peter Leibiger added a comment - michaelneale Sounds good.

          Andrew Bayer added a comment -

          Yeah, I'm gonna go with the current implementation but reserve the right to revisit this in the future, 'cos it's an area that I think we'll need to have more agent implementations to really know what's best. But for now, yeah. We're good. Just gotta make a few tweaks to the PR to properly support nested maps and we should be good to go.

          Andrew Bayer added a comment - Yeah, I'm gonna go with the current implementation but reserve the right to revisit this in the future, 'cos it's an area that I think we'll need to have more agent implementations to really know what's best. But for now, yeah. We're good. Just gotta make a few tweaks to the PR to properly support nested maps and we should be good to go.

          Andrew Bayer added a comment -

          Ouch, nested maps is gonna take some time, so I'm pulling that for now and going with the current state. We don't have a need for nested maps support right now anyway.

          Andrew Bayer added a comment - Ouch, nested maps is gonna take some time, so I'm pulling that for now and going with the current state. We don't have a need for nested maps support right now anyway.

          Andrew Bayer added a comment -

          Ok, new PR (https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/85) up with a new syntax! =)

          agent none
          
          agent {
              label "foo"
          }
          
          agent {
              docker {
                 nodeLabel "foo"
                 image "some-image"
                 args "--hi-there"
              }
           }
          
          agent {
              dockerfile true
          }
          // or if you've got multiple arguments...
          agent {
              dockerfile {
                  dockerfile true
                  args "--hi-there"
              }
          }
          

          I know it's not ideal, but I think it's better than what's there in the original PR, and it's dramatically easier than allowing specifying label, docker (block) etc together at the same level in agent. I think it solves the label confusion by clarifying it as nodeLabel, but let me know if I'm wrong. =)

          Andrew Bayer added a comment - Ok, new PR ( https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/85 ) up with a new syntax! =) agent none agent { label "foo" } agent { docker { nodeLabel "foo" image "some-image" args "--hi-there" } } agent { dockerfile true } // or if you've got multiple arguments... agent { dockerfile { dockerfile true args "--hi-there" } } I know it's not ideal, but I think it's better than what's there in the original PR, and it's dramatically easier than allowing specifying label , docker (block) etc together at the same level in agent . I think it solves the label confusion by clarifying it as nodeLabel , but let me know if I'm wrong. =)

          Patrick Wolf added a comment -

          Crap. We've changed it again. I already documented the previous way and it is going to print. Let me know the final syntax so I can stop the cards being printed, abayer

          Patrick Wolf added a comment - Crap. We've changed it again. I already documented the previous way and it is going to print. Let me know the final syntax so I can stop the cards being printed, abayer

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          SYNTAX.md
          pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTAgent.java
          pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTClosureMap.java
          pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidator.java
          pipeline-model-api/src/main/resources/ast-schema.json
          pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Agent.groovy
          pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Root.groovy
          pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.groovy
          pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/JSONParser.groovy
          pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy
          pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy
          pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipeline.java
          pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfile.java
          pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ClosureModelTranslator.groovy
          pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/Messages.properties
          pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
          pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfileScript.groovy
          pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineScript.groovy
          pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/config/FolderConfig/config.groovy
          pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/config/FolderConfig/help-dockerLabel.html
          pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/config/GlobalConfig/config.groovy
          pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/config/GlobalConfig/help-dockerLabel.html
          pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java
          pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AgentTest.java
          pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java
          pipeline-model-definition/src/test/resources/agentDocker.groovy
          pipeline-model-definition/src/test/resources/agentDockerEnvSpecLabel.groovy
          pipeline-model-definition/src/test/resources/agentDockerEnvTest.groovy
          pipeline-model-definition/src/test/resources/agentDockerWithEmptyDockerArgs.groovy
          pipeline-model-definition/src/test/resources/agentDockerWithNullDockerArgs.groovy
          pipeline-model-definition/src/test/resources/agentLabel.groovy
          pipeline-model-definition/src/test/resources/agentTypeOrdering.groovy
          pipeline-model-definition/src/test/resources/buildPluginParentPOM.groovy
          pipeline-model-definition/src/test/resources/dockerGlobalVariable.groovy
          pipeline-model-definition/src/test/resources/dockerGlobalVariableInScript.groovy
          pipeline-model-definition/src/test/resources/environmentInStage.groovy
          pipeline-model-definition/src/test/resources/errors/agentMissingRequiredParam.groovy
          pipeline-model-definition/src/test/resources/errors/agentUnknownParamForType.groovy
          pipeline-model-definition/src/test/resources/errors/duplicateEnvironment.groovy
          pipeline-model-definition/src/test/resources/errors/emptyEnvironment.groovy
          pipeline-model-definition/src/test/resources/errors/globalLibraryNonStepBody.groovy
          pipeline-model-definition/src/test/resources/errors/globalLibraryObjectMethodCall.groovy
          pipeline-model-definition/src/test/resources/errors/invalidMetaStepSyntax.groovy
          pipeline-model-definition/src/test/resources/errors/notInstalledToolVersion.groovy
          pipeline-model-definition/src/test/resources/errors/perStageConfigEmptySteps.groovy
          pipeline-model-definition/src/test/resources/errors/perStageConfigMissingSteps.groovy
          pipeline-model-definition/src/test/resources/errors/perStageConfigUnknownSection.groovy
          pipeline-model-definition/src/test/resources/errors/unknownAgentType.groovy
          pipeline-model-definition/src/test/resources/errors/unlistedToolType.groovy
          pipeline-model-definition/src/test/resources/failureBeforeStages.groovy
          pipeline-model-definition/src/test/resources/fromAlternateDockerfile.groovy
          pipeline-model-definition/src/test/resources/fromDockerfile.groovy
          pipeline-model-definition/src/test/resources/globalLibrarySuccess.groovy
          pipeline-model-definition/src/test/resources/globalLibrarySuccessInScript.groovy
          pipeline-model-definition/src/test/resources/json/agentAny.json
          pipeline-model-definition/src/test/resources/json/agentDocker.json
          pipeline-model-definition/src/test/resources/json/agentLabel.json
          pipeline-model-definition/src/test/resources/json/agentNoneWithNode.json
          pipeline-model-definition/src/test/resources/json/agentTypeOrdering.json
          pipeline-model-definition/src/test/resources/json/basicWhen.json
          pipeline-model-definition/src/test/resources/json/environmentInStage.json
          pipeline-model-definition/src/test/resources/json/errors/agentMissingRequiredParam.json
          pipeline-model-definition/src/test/resources/json/errors/agentUnknownParamForType.json
          pipeline-model-definition/src/test/resources/json/errors/emptyEnvironment.json
          pipeline-model-definition/src/test/resources/json/errors/emptyJobProperties.json
          pipeline-model-definition/src/test/resources/json/errors/emptyParallel.json
          pipeline-model-definition/src/test/resources/json/errors/emptyParameters.json
          pipeline-model-definition/src/test/resources/json/errors/emptyPostBuild.json
          pipeline-model-definition/src/test/resources/json/errors/emptyStages.json
          pipeline-model-definition/src/test/resources/json/errors/emptyTriggers.json
          pipeline-model-definition/src/test/resources/json/errors/invalidBuildCondition.json
          pipeline-model-definition/src/test/resources/json/errors/invalidParameterTypeMethodCall.json
          pipeline-model-definition/src/test/resources/json/errors/invalidWrapperType.json
          pipeline-model-definition/src/test/resources/json/errors/malformed.json
          pipeline-model-definition/src/test/resources/json/errors/missingAgent.json
          pipeline-model-definition/src/test/resources/json/errors/missingRequiredMethodCallArg.json
          pipeline-model-definition/src/test/resources/json/errors/missingRequiredStepParameters.json
          pipeline-model-definition/src/test/resources/json/errors/missingStages.json
          pipeline-model-definition/src/test/resources/json/errors/mixedMethodArgs.json
          pipeline-model-definition/src/test/resources/json/errors/notInstalledToolType.json
          pipeline-model-definition/src/test/resources/json/errors/notInstalledToolVersion.json
          pipeline-model-definition/src/test/resources/json/errors/notificationsSectionRemoved.json
          pipeline-model-definition/src/test/resources/json/errors/perStageConfigEmptySteps.json
          pipeline-model-definition/src/test/resources/json/errors/perStageConfigMissingSteps.json
          pipeline-model-definition/src/test/resources/json/errors/perStageConfigUnknownSection.json
          pipeline-model-definition/src/test/resources/json/errors/rejectParallelMixedInSteps.json
          pipeline-model-definition/src/test/resources/json/errors/rejectPropertiesStepInMethodCall.json
          pipeline-model-definition/src/test/resources/json/errors/rejectStageInSteps.json
          pipeline-model-definition/src/test/resources/json/errors/stageWithoutName.json
          pipeline-model-definition/src/test/resources/json/errors/unknownAgentType.json
          pipeline-model-definition/src/test/resources/json/errors/unknownBareAgentType.json
          pipeline-model-definition/src/test/resources/json/errors/unknownStepParameter.json
          pipeline-model-definition/src/test/resources/json/errors/unlistedToolType.json
          pipeline-model-definition/src/test/resources/json/errors/wrongParameterNameMethodCall.json
          pipeline-model-definition/src/test/resources/json/globalLibrarySuccess.json
          pipeline-model-definition/src/test/resources/json/legacyMetaStepSyntax.json
          pipeline-model-definition/src/test/resources/json/metaStepSyntax.json
          pipeline-model-definition/src/test/resources/json/multipleVariablesForAgent.json
          pipeline-model-definition/src/test/resources/json/multipleWrappers.json
          pipeline-model-definition/src/test/resources/json/parallelPipeline.json
          pipeline-model-definition/src/test/resources/json/parallelPipelineQuoteEscaping.json
          pipeline-model-definition/src/test/resources/json/parallelPipelineWithFailFast.json
          pipeline-model-definition/src/test/resources/json/parallelPipelineWithSpaceInBranch.json
          pipeline-model-definition/src/test/resources/json/perStageConfigAgent.json
          pipeline-model-definition/src/test/resources/json/simpleEnvironment.json
          pipeline-model-definition/src/test/resources/json/simpleJobProperties.json
          pipeline-model-definition/src/test/resources/json/simpleParameters.json
          pipeline-model-definition/src/test/resources/json/simplePipeline.json
          pipeline-model-definition/src/test/resources/json/simplePostBuild.json
          pipeline-model-definition/src/test/resources/json/simpleScript.json
          pipeline-model-definition/src/test/resources/json/simpleTools.json
          pipeline-model-definition/src/test/resources/json/simpleTriggers.json
          pipeline-model-definition/src/test/resources/json/simpleWrapper.json
          pipeline-model-definition/src/test/resources/json/skippedWhen.json
          pipeline-model-definition/src/test/resources/json/steps/simpleScript.json
          pipeline-model-definition/src/test/resources/json/stringsNeedingEscapeLogic.json
          pipeline-model-definition/src/test/resources/json/toolsInStage.json
          pipeline-model-definition/src/test/resources/json/twoStagePipeline.json
          pipeline-model-definition/src/test/resources/json/validStepParameters.json
          pipeline-model-definition/src/test/resources/legacyMetaStepSyntax.groovy
          pipeline-model-definition/src/test/resources/metaStepSyntax.groovy
          pipeline-model-definition/src/test/resources/multipleVariablesForAgent.groovy
          pipeline-model-definition/src/test/resources/noCheckoutScmInWrongContext.groovy
          pipeline-model-definition/src/test/resources/nonLiteralEnvironment.groovy
          pipeline-model-definition/src/test/resources/perStageConfigAgent.groovy
          pipeline-model-definition/src/test/resources/postStage/localAll.groovy
          pipeline-model-definition/src/test/resources/simpleEnvironment.groovy
          pipeline-model-definition/src/test/resources/simpleTools.groovy
          pipeline-model-definition/src/test/resources/toolsInStage.groovy
          pipeline-model-definition/src/test/resources/when/simpleWhen.groovy
          pipeline-model-definition/src/test/resources/when/whenEmpty.groovy
          pipeline-model-definition/src/test/resources/when/whenException.groovy
          http://jenkins-ci.org/commit/pipeline-model-definition-plugin/68f711c650b518296b154a9590d933ab251875fd
          Log:
          [FIXED JENKINS-40524] Reworked agent syntax to be more extensible.

          Moves agent to a block (except for any and none) and moves any agent
          type with more than one argument into a nested block as well. For example:

          ```groovy
          agent {
          label "foo"
          }

          agent {
          docker

          { nodeLabel "foo" image "some-image" args "--hi-there" }

          }
          ```

          Also renamed arguments for docker and dockerfile - label to nodeLabel,
          dockerArgs to args, docker to image. Still thinking about how to
          handle dockerfile more elegantly.

          This also simplifies the JSON model considerably.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: SYNTAX.md pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTAgent.java pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTClosureMap.java pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidator.java pipeline-model-api/src/main/resources/ast-schema.json pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Agent.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Root.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/JSONParser.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipeline.java pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfile.java pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ClosureModelTranslator.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/Messages.properties pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfileScript.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineScript.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/config/FolderConfig/config.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/config/FolderConfig/help-dockerLabel.html pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/config/GlobalConfig/config.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/config/GlobalConfig/help-dockerLabel.html pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AgentTest.java pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java pipeline-model-definition/src/test/resources/agentDocker.groovy pipeline-model-definition/src/test/resources/agentDockerEnvSpecLabel.groovy pipeline-model-definition/src/test/resources/agentDockerEnvTest.groovy pipeline-model-definition/src/test/resources/agentDockerWithEmptyDockerArgs.groovy pipeline-model-definition/src/test/resources/agentDockerWithNullDockerArgs.groovy pipeline-model-definition/src/test/resources/agentLabel.groovy pipeline-model-definition/src/test/resources/agentTypeOrdering.groovy pipeline-model-definition/src/test/resources/buildPluginParentPOM.groovy pipeline-model-definition/src/test/resources/dockerGlobalVariable.groovy pipeline-model-definition/src/test/resources/dockerGlobalVariableInScript.groovy pipeline-model-definition/src/test/resources/environmentInStage.groovy pipeline-model-definition/src/test/resources/errors/agentMissingRequiredParam.groovy pipeline-model-definition/src/test/resources/errors/agentUnknownParamForType.groovy pipeline-model-definition/src/test/resources/errors/duplicateEnvironment.groovy pipeline-model-definition/src/test/resources/errors/emptyEnvironment.groovy pipeline-model-definition/src/test/resources/errors/globalLibraryNonStepBody.groovy pipeline-model-definition/src/test/resources/errors/globalLibraryObjectMethodCall.groovy pipeline-model-definition/src/test/resources/errors/invalidMetaStepSyntax.groovy pipeline-model-definition/src/test/resources/errors/notInstalledToolVersion.groovy pipeline-model-definition/src/test/resources/errors/perStageConfigEmptySteps.groovy pipeline-model-definition/src/test/resources/errors/perStageConfigMissingSteps.groovy pipeline-model-definition/src/test/resources/errors/perStageConfigUnknownSection.groovy pipeline-model-definition/src/test/resources/errors/unknownAgentType.groovy pipeline-model-definition/src/test/resources/errors/unlistedToolType.groovy pipeline-model-definition/src/test/resources/failureBeforeStages.groovy pipeline-model-definition/src/test/resources/fromAlternateDockerfile.groovy pipeline-model-definition/src/test/resources/fromDockerfile.groovy pipeline-model-definition/src/test/resources/globalLibrarySuccess.groovy pipeline-model-definition/src/test/resources/globalLibrarySuccessInScript.groovy pipeline-model-definition/src/test/resources/json/agentAny.json pipeline-model-definition/src/test/resources/json/agentDocker.json pipeline-model-definition/src/test/resources/json/agentLabel.json pipeline-model-definition/src/test/resources/json/agentNoneWithNode.json pipeline-model-definition/src/test/resources/json/agentTypeOrdering.json pipeline-model-definition/src/test/resources/json/basicWhen.json pipeline-model-definition/src/test/resources/json/environmentInStage.json pipeline-model-definition/src/test/resources/json/errors/agentMissingRequiredParam.json pipeline-model-definition/src/test/resources/json/errors/agentUnknownParamForType.json pipeline-model-definition/src/test/resources/json/errors/emptyEnvironment.json pipeline-model-definition/src/test/resources/json/errors/emptyJobProperties.json pipeline-model-definition/src/test/resources/json/errors/emptyParallel.json pipeline-model-definition/src/test/resources/json/errors/emptyParameters.json pipeline-model-definition/src/test/resources/json/errors/emptyPostBuild.json pipeline-model-definition/src/test/resources/json/errors/emptyStages.json pipeline-model-definition/src/test/resources/json/errors/emptyTriggers.json pipeline-model-definition/src/test/resources/json/errors/invalidBuildCondition.json pipeline-model-definition/src/test/resources/json/errors/invalidParameterTypeMethodCall.json pipeline-model-definition/src/test/resources/json/errors/invalidWrapperType.json pipeline-model-definition/src/test/resources/json/errors/malformed.json pipeline-model-definition/src/test/resources/json/errors/missingAgent.json pipeline-model-definition/src/test/resources/json/errors/missingRequiredMethodCallArg.json pipeline-model-definition/src/test/resources/json/errors/missingRequiredStepParameters.json pipeline-model-definition/src/test/resources/json/errors/missingStages.json pipeline-model-definition/src/test/resources/json/errors/mixedMethodArgs.json pipeline-model-definition/src/test/resources/json/errors/notInstalledToolType.json pipeline-model-definition/src/test/resources/json/errors/notInstalledToolVersion.json pipeline-model-definition/src/test/resources/json/errors/notificationsSectionRemoved.json pipeline-model-definition/src/test/resources/json/errors/perStageConfigEmptySteps.json pipeline-model-definition/src/test/resources/json/errors/perStageConfigMissingSteps.json pipeline-model-definition/src/test/resources/json/errors/perStageConfigUnknownSection.json pipeline-model-definition/src/test/resources/json/errors/rejectParallelMixedInSteps.json pipeline-model-definition/src/test/resources/json/errors/rejectPropertiesStepInMethodCall.json pipeline-model-definition/src/test/resources/json/errors/rejectStageInSteps.json pipeline-model-definition/src/test/resources/json/errors/stageWithoutName.json pipeline-model-definition/src/test/resources/json/errors/unknownAgentType.json pipeline-model-definition/src/test/resources/json/errors/unknownBareAgentType.json pipeline-model-definition/src/test/resources/json/errors/unknownStepParameter.json pipeline-model-definition/src/test/resources/json/errors/unlistedToolType.json pipeline-model-definition/src/test/resources/json/errors/wrongParameterNameMethodCall.json pipeline-model-definition/src/test/resources/json/globalLibrarySuccess.json pipeline-model-definition/src/test/resources/json/legacyMetaStepSyntax.json pipeline-model-definition/src/test/resources/json/metaStepSyntax.json pipeline-model-definition/src/test/resources/json/multipleVariablesForAgent.json pipeline-model-definition/src/test/resources/json/multipleWrappers.json pipeline-model-definition/src/test/resources/json/parallelPipeline.json pipeline-model-definition/src/test/resources/json/parallelPipelineQuoteEscaping.json pipeline-model-definition/src/test/resources/json/parallelPipelineWithFailFast.json pipeline-model-definition/src/test/resources/json/parallelPipelineWithSpaceInBranch.json pipeline-model-definition/src/test/resources/json/perStageConfigAgent.json pipeline-model-definition/src/test/resources/json/simpleEnvironment.json pipeline-model-definition/src/test/resources/json/simpleJobProperties.json pipeline-model-definition/src/test/resources/json/simpleParameters.json pipeline-model-definition/src/test/resources/json/simplePipeline.json pipeline-model-definition/src/test/resources/json/simplePostBuild.json pipeline-model-definition/src/test/resources/json/simpleScript.json pipeline-model-definition/src/test/resources/json/simpleTools.json pipeline-model-definition/src/test/resources/json/simpleTriggers.json pipeline-model-definition/src/test/resources/json/simpleWrapper.json pipeline-model-definition/src/test/resources/json/skippedWhen.json pipeline-model-definition/src/test/resources/json/steps/simpleScript.json pipeline-model-definition/src/test/resources/json/stringsNeedingEscapeLogic.json pipeline-model-definition/src/test/resources/json/toolsInStage.json pipeline-model-definition/src/test/resources/json/twoStagePipeline.json pipeline-model-definition/src/test/resources/json/validStepParameters.json pipeline-model-definition/src/test/resources/legacyMetaStepSyntax.groovy pipeline-model-definition/src/test/resources/metaStepSyntax.groovy pipeline-model-definition/src/test/resources/multipleVariablesForAgent.groovy pipeline-model-definition/src/test/resources/noCheckoutScmInWrongContext.groovy pipeline-model-definition/src/test/resources/nonLiteralEnvironment.groovy pipeline-model-definition/src/test/resources/perStageConfigAgent.groovy pipeline-model-definition/src/test/resources/postStage/localAll.groovy pipeline-model-definition/src/test/resources/simpleEnvironment.groovy pipeline-model-definition/src/test/resources/simpleTools.groovy pipeline-model-definition/src/test/resources/toolsInStage.groovy pipeline-model-definition/src/test/resources/when/simpleWhen.groovy pipeline-model-definition/src/test/resources/when/whenEmpty.groovy pipeline-model-definition/src/test/resources/when/whenException.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/68f711c650b518296b154a9590d933ab251875fd Log: [FIXED JENKINS-40524] Reworked agent syntax to be more extensible. Moves agent to a block (except for any and none) and moves any agent type with more than one argument into a nested block as well. For example: ```groovy agent { label "foo" } agent { docker { nodeLabel "foo" image "some-image" args "--hi-there" } } ``` Also renamed arguments for docker and dockerfile - label to nodeLabel, dockerArgs to args, docker to image. Still thinking about how to handle dockerfile more elegantly. This also simplifies the JSON model considerably.

          Liam Newman added a comment -

          Bulk closing resolved issues.

          Liam Newman added a comment - Bulk closing resolved issues.

            abayer Andrew Bayer
            abayer Andrew Bayer
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: