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

Enums not supported in JCasc plugin

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      configuration-as-code-0.10-alpha

      Description

      Configurator.lookup() in JCasc plugin returns null for java.util.concurrent.TimeUnit which is an Enum class.

       

      Using configuration-as-code plugin to find a configurator of step (Jenkins pipeline steps) class using Configurator configurator = Configurator.lookup(clazz) (clazz represent class of jenkins pipeline step) and then using Object stepObject = configurator.configure(mapping) to configure stepObject (link: https://github.com/gautamabhishek46/simple-pull-request-job-plugin/blob/7a647b0cd81c88867043e4cecf40404ffd67c431/src/main/java/io/jenkins/plugins/sprp/PipelineSnippetGenerator.java#L297).
      I found that Configurator.lookup() method returns a null for class java.util.concurrent.TimeUnit which is a Enum.

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          It has been fixed by Nicolas De Loof in JCasC: https://github.com/jenkinsci/configuration-as-code-plugin/commit/4a00053f403f556287b0f28ecc2cf1919f149e4b

          Alpha release is needed to get the patch integrated

           

          Show
          oleg_nenashev Oleg Nenashev added a comment - It has been fixed by Nicolas De Loof in JCasC:  https://github.com/jenkinsci/configuration-as-code-plugin/commit/4a00053f403f556287b0f28ecc2cf1919f149e4b Alpha release is needed to get the patch integrated  

            People

            • Assignee:
              gautamabhishek46 Abhishek Gautam
              Reporter:
              gautamabhishek46 Abhishek Gautam
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: