Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-46065

Provide extension point for contributing validation checks to Declarative

    Details

    • Sprint:
      Declarative - 1.2
    • Similar Issues:

      Description

      Right now, all validation for Declarative is hardcoded in ModelValidatorImpl. This means that an extension of, say, DeclarativeAgent or DeclarativeStageConditional can't require any specific validation unless it's in pipeline-model-definition and we add it to ModelValidatorImpl. I'd suggest we add an extension point for contributing more validation checks.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java
            pipeline-model-definition/src/test/resources/errors/validatorContributor.groovy
            pipeline-model-extensions/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/validator/DeclarativeValidatorContributor.java
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/b496df9254bae6f4aea68c7cc9c70f6b3af90650
            Log:
            [FIXED JENKINS-46065] Add extension point for contributing validation

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java pipeline-model-definition/src/test/resources/errors/validatorContributor.groovy pipeline-model-extensions/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/validator/DeclarativeValidatorContributor.java http://jenkins-ci.org/commit/pipeline-model-definition-plugin/b496df9254bae6f4aea68c7cc9c70f6b3af90650 Log: [FIXED JENKINS-46065] Add extension point for contributing validation
            Hide
            abayer Andrew Bayer added a comment -

            This will be in Declarative 1.2.

            Show
            abayer Andrew Bayer added a comment - This will be in Declarative 1.2.
            Show
            abayer Andrew Bayer added a comment - PR up at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/179

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                abayer Andrew Bayer
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: